all steps about javascript code example
Example 1: javascript steps
formEl.addEventListener("submit",click);
function click(event){
event.preventDefault();
var from = event.target.from.value;
var to = event.target.to.value;
var capacity = event.target.capacity.value;
var reserve = event.target.reserve.value;
var object=new data(from,to,capacity,reserve);
object.leftedSeats();
object.render();
object.total();
set();
}
Example 2: javascript steps
data.prototype.leftedSeats=function()
{
this.lefted = this.capacity-this.reserve ;
}
data.prototype.leftedSeats();