Resolved: JavaScript variable number of arguments to function #programming #development #it
Resolved: JavaScript variable number of arguments to function #programming #development #it
JavaScript variable number of arguments to function
Is there a way to allow “unlimited” vars for a function in JavaScript?
Example:
load(var1, var2, var3, var4, var5, etc...) load(var1)
Answer [by roufamatic]: JavaScript variable number of arguments to function
Sure, just use the arguments object.
function foo() { for (var i = 0; i < arguments.length; i++) { alert(arguments[i]); } }
Answer [by
View On WordPress













