0

Examples of arguments[..],,please!

In JavaScript: "If you pass more arguments than are defined, they will be assigned to an array called arguments. They can be used like this: arguments[0], arguments[1], etc." Now, I need an example of arguments[0], arguments[1] etc

4th Jun 2020, 10:21 PM
S M Ashikur Rahman
S M Ashikur Rahman - avatar
1 Resposta
+ 5
var a; var b; function add(a,b){ var c=a+b; console.log(c,arguments[0],arguments[1],arguments[2],arguments[3]); } add(5,6,7,8)
4th Jun 2020, 10:40 PM
Abhay
Abhay - avatar