(You should be able to clone this gist and run node example[x].js
for each JS file here to do the exercises).
- What do you think will happen when you execute
example1.js
? - What happens if you comment out line 12 and run
example1.js
? Why? - What do think will happen when you execute
example2.js
? Did it work as you expected? - What would happen if you added a new line to the end of
example3.js
andconsole.log(mySecretValue);
? Why? - What type is
secretKeeper
on line 12 ofexample4.js
? How did it get assigned? - What code does
secretKeeper()
execute when it is invoked on line 13 ofexample4.js
? What does it return and how? - What type is
secret
as of line 13 ofexample4.js
? - What will log to the
console
in line 14 ofexample5.js
? Line 15?