Javascript - is it bad to pass more arguments than the function declares?

Posted by Spines on Stack Overflow See other posts from Stack Overflow or by Spines
Published on 2010-03-26T17:56:21Z Indexed on 2010/03/26 18:03 UTC
Read the original article Hit count: 102

Filed under:

I have a function

function callback(obj){...}

Is it okay to pass in more objects than were declared in the function signature? Eg, call it like this:

callback(theObject, extraParam);

I tried it out on firefox and it didn't seem to have a problem, but is it bad to do this?

© Stack Overflow or respective owner

Related posts about JavaScript