The Power and Perils of arguments
Learn why the arguments object was needed in JavaScript and get to know its pros and cons.
We'll cover the following
The ability to pass a variable number of arguments to a function is esoteric in many languages, but it is commonplace in JavaScript.
📝Note: JavaScript functions always take a variable number of arguments, even if we define named parameters in function definitions.
Here’s a max()
function that takes two named parameters:
Get hands-on with 1400+ tech skills courses.