Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript whats wrong with this funtion? Reply To: whats wrong with this funtion?

#153746
__
Participant

you can’t use + in the function parameter list. you need to use a comma , to separate them.

var sam=new Object();
sam.color="red";
sam.height= function( a,b ){
    return a+b;
}