Option Hash Using jQuery


/ Published in: JavaScript
Save to your folder(s)

If you have a complex function you may need to pass it lots of arguments. Instead of having to remember how many you need to pass, and passing 'null' for un needed arguments, pass the function an object.

Now you can set the defaults inside the function, which will be superseeded if they are passed as an argument.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.