what to do when you have unknown number of arguments code example
Example: 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]);
}
var print_names = function(...names) {
for (let i=0; i<names.length; i++) console.log(names[i]);
}