Compare commits

...

2 Commits

Author SHA1 Message Date
jason.zhu 2a5ef56d42 Module4: Using the Spread Operator 2021-05-13 15:14:05 +10:00
jason.zhu d822050bdc Module4: Constructing Rest Parameters 2021-05-13 15:03:13 +10:00
1 changed files with 5 additions and 4 deletions

9
app.js
View File

@ -1,5 +1,6 @@
function sayHi(message, name = 'World') {
console.log(message + " " + name);
function display(char1, char2, char3, char4, ...others) {
console.log(others);
console.log(char1, char2, char3, char4);
}
sayHi("Hello");
sayHi("Hi", 'John');
let letters = 'abcdefgh';
display(...letters);