Accessing Arguments Using the Arguments Object


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

Every function has an object called the arguments object. This is an object that contains all the arguments that were passed to the function. The example below shows how to access these. Very rarely used but useful to know. Note: it may look like an array, but it's better to think of it as an object with numbered properties.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.