First exercise from NSS, first week of Node learning
Create a file called cheer.js
that performs a cheer, using a named passed to it. Use as many of these as you can, even if the code you write isn't as compact or 'efficient' as you would like. This is more about trying out some ES6 than being succinct.
- const and/or let
- Object literal shorthand
- Destructuring assignments
- Fat arrow function(s)
- Spread operator
- Template literals
Execute the file by typing node cheer.js
inside the file's directory.
Expected:
$ node cheer.js
Give me a J!
Give me an O!
Give me an H!
Give me an N!
Give me a D!
Give me an O!
Give me an E!
What does that spell?
JOHN DOE!
Note: the 'a' vs. 'an'
- Delay each line by 1 second