1var print_names = function(...names) {
2 for (let i=0; i<names.length; i++) console.log(names[i]);
3}
1function add (...numbers) {
2 let sum = 0;
3 for (let i = 0; i < numbers.length; i++) {
4 sum += numbers[i]
5 };
6 console.log(sum);
7};
8
9add(2, 3);
10add(5, 3, 7, 2);