2021-05-13 15:03:13 +10:00

5 lines
200 B
JavaScript

function greet(...names, message) { // SyntaxError generated
console.log(message + ' everyone!');
names.forEach(name => console.log('Hi ' + name));
}
greet('Welcome', 'Mary', 'John', 'James');