steps with # in javascript code example
Example 1: javascript steps
data.prototype.leftedSeats=function()
{
this.lefted = this.capacity-this.reserve ;
}
data.prototype.leftedSeats();
Example 2: javascript steps
var tableEl = document.getElementById("table");
var headerArr=['from','to','capacity','reserve','lefted'];
function header(){
var trEl = document.createElement('tr');
tableEl.appendChild(trEl);
for(var i=0 ; i < headerArr.length ; i++ ){
var thEl = document.createElement('th');
trEl.appendChild(thEl);
thEl.textContent = `${headerArr[i]}`;
}
}
header();