And of course there is always a compromise solution: use several formal 
parameters and a config object at the same time:
function doSomething(param1, param2, config) {
// do something...
}
In this example* param1* and *param2* are 'main' arguments (normally they 
are required) and *config* is an optional object that can contain additional 
configuration options for perfoming some routine. The idea is separating 
primary and secondary function parameters.

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to