Your first NodeJS program
In your projects folder create a node-first-steps folder. Use that folder for this exercise.
- Create a file called called
greet.jsand copy your Bootcampgreetfunction in there. - Below your greet function call it like this :
var msg = greet('Xola') - Now print the greeting to the screen like this :
console.log(msg) - Run it from the command line using NodeJS like this
node greet.js- you should seeHello, Xolaprinted in the console.
You can try this for some of your other Bootcamp functions.