1function display_numbers(...numbers) {
2 colors.forEach(function(x) {
3 console.log(x);
4 });
5}
6
7// call it like:
8display_numbers(1)
9display_numbers(1, 2, 3, 4)
10display_numbers(1, -1, 9, 0, 2)
1var print_names = function(...names) {
2 for (let i=0; i<names.length; i++) console.log(names[i]);
3}