diff --git a/app.js b/app.js index a4431a5..e08c31f 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,5 @@ -function sayHi(message, name = 'World') { - console.log(message + " " + name); +function greet(...names, message) { // SyntaxError generated + console.log(message + ' everyone!'); + names.forEach(name => console.log('Hi ' + name)); } -sayHi("Hello"); -sayHi("Hi", 'John'); \ No newline at end of file +greet('Welcome', 'Mary', 'John', 'James'); \ No newline at end of file