search for: another_v

Displaying 1 result from an estimated 1 matches for "another_v".

Did you mean: anotherdv
2006 Jul 13
5
Does Javascript let you default input params like Ruby does?
Can you have a Javascript function with a param that''s defaulted if it isn''t present? function X(a, b = false, c = ''dog'') { } X(5) calls X with a=5, b=false, c=''dog'' X(4, true) calls X with a=4, b=true, c=''dog'' X(3, true, ''cat'') calls X with a=3, b=true, c=''cat'' ? -- Posted via