Coding Fortune Teller

Would like to hear your thoughts. I found this quite simple, hardest part was getting the the export / import to work in Node.js.

Matt :slight_smile:

1 Like

i also did a Fortune teller :smiley: so far i did all the js but dont get the node part. what exactly we need to do with node ? :sweat_smile:

You need to do the following:

  1. Install the latest stable version of node.js onto your machine
  2. Once you have made your JavaScript file you can enter the command line
  3. From the command line change directory to your JavaScript file
  4. node myFile.js (make sure to enter your file name instead of myFile)

This will run the program on your computer, node.js is basically a way of running JavaScript files on your computer but not in a browser.

yea thanks. i kind of coded this exercise to work with html later. so it didn’t print anything in terminal and it got me confused, because i couldn’t call the function. so i just called it in js file. :yum:

1 Like