js how to accept not known params 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]);
}