Is It Possible To Have A Javascript Variable To Have Two Or More Functions Inside?
I have the following Javascript code: var Lab = { minseat: function(){ var seat = 10; return seat; } maxseat: function(){
Solution 1:
You forgot a comma after the first function:
varLab = {
minseat: function(){
var seat = 10;
return seat;
},
maxseat: function(){
var seat = 50;
return seat;
}
}
Post a Comment for "Is It Possible To Have A Javascript Variable To Have Two Or More Functions Inside?"