Download to read offline

![Arguments is an Array-like object accessible inside functions that contains the values of the arguments passed to that function. function getTotalSalary(HRA, basic, conveyance) { console.log(arguments[0]); // Expected Output: 1000 console.log(arguments[1]); // Expected Output: 7000 console.log(arguments[2]); // Expected Output: 2000 }); getTotalSalary(1000, 7000, 2000);](https://image.slidesharecdn.com/3zsrya7vtpifqd9zi4vh-signature-8dab50422e85747d9d6ddcb8711c6037e48fdd47b5912103b686e9d36015329d-poli-200609035612/75/Arguments-Object-in-JavaScript-2-2048.jpg)
![● The arguments object is not an Array. It has none of the Array properties except length. ● It can be converted to an array var args = Array.prototype.slice.call(arguments); OR // Using an array literal is shorter than above but allocates an empty array var args = [].slice.call(arguments); ● console.log(typeof arguments) // ‘object’ ;](https://image.slidesharecdn.com/3zsrya7vtpifqd9zi4vh-signature-8dab50422e85747d9d6ddcb8711c6037e48fdd47b5912103b686e9d36015329d-poli-200609035612/75/Arguments-Object-in-JavaScript-3-2048.jpg)
The arguments object in JavaScript is an array-like object that holds the values of arguments passed to a function. It is not a true array and lacks array properties except for length, but can be converted into an array using methods like Array.prototype.slice. The document provides an example of using the arguments object in a function to access passed values.