javascript function argument handling


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

/*
* A little help function for when I'm creating functions
*
* When I pluck values from function arguments I tend to
* write content of this function repeatedly.
*
* e.g.
* a = arguments
* this.id = arg(a, 0)
* this.name = arg(a, 3)
*
* this.id == 6
* this.name == null
*/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.