Possible Duplicate:
How do I make a default value for a parameter to a javascript function
in PHP:
function func($a = 10, $b = 20){
// if func() is called with no arguments $a will be 10 and $ b will be 20
}
How can you do this in JavaScript?
I get a error if I try to assign values in function arguments
missing ) after formal parameters