It’s always enthusiastic to start a project from scratch and have full control to it, decide which technologies or architecture to use the feeling of freedom to refactor or rewrite whatever you want it whenever you want it, without having to explain or fight with the rest of the team.

Within any function, you can use the arguments variable to get an array-like list of all of the arguments passed into the function.

The arguments parameter It is a local variable accessible within inside functions and contains an entry for each argument passed to that function. The arguments is an Array-like object which can be used to access arguments passed to the function even if a matching parameter isn’t explicitly defined.

function add() {

// Set a starting total
var total = 0;

// Add each number to the total
for (var i = 0; i < arguments.length; i++) {
total += arguments[i];
}

// Return to the total
return total;
};

Mohammed Nokri

Frontend Developer sharing weekly JS, HTML, CSS 🔥

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store