FULL STACK   ·   UI   ·   UX   ·   GRAPHICS   ·   DEVELOPER   ·   INSTRUCTOR

Adam Khoury

Donate funds to show love and support

Click the button below to donate funds securely online. You can use your PayPal account or a credit card.

Your donations help free up my time to produce more content and assist in covering server costs. It's also a great way to say thanks for the content!

Application Configuration

Adam will be adding options here soon.

JavaScript Arguments Object Function Tutorial

Published :
Author :
Adam Khoury

In this exercise we explore the Arguments object in JavaScript. Which enables us to create special functions that can intake an undetermined amount of arguments. All of the functions we write, have an arguments object tied to them that we can access.

Access function arguments using their index position. function doSomething() { alert( arguments[0]+" "+arguments[1] ); } doSomething("Hello", "World"); Access function arguments through iteration with a loop. function sum() { var result = 0; for( i = 0; i < arguments.length; i++ ){ result += arguments[i]; } return result; } alert( sum(10, 5, 2, 3, 10) );