Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Pass unknown number of arguments into javascript function

var print_names = function(...names) {
    for (let i=0; i<names.length; i++) console.log(names[i]);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Pass #unknown #number #arguments #javascript #function
ADD COMMENT
Topic
Name
9+1 =