passing unknown argument in a function javascript 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]);
}