Same as hangman except a little more light-hearted...
This little game can be used to teach first time javascript programmers about string manipulation and arrays. Also, it is a game, and games are fun, right? :)
- Terminal - Mac program where you can type commands into the computer
- Sublime Text - text editor program for writing code which will color/highlight key words in your javascript files
- Node - program which allows you to run your javascript files on your computer from the terminal
Here's a nifty trick for how to open any program on your Mac using only the keyboard. Just type command (โ) + SpaceBar to open the Search bar, and then type the name of the application you want to open.
ls
- List all the contents of the current directory. (Remember the terminal always has a home directory)cd <directoryName>
- Navigates the terminal to the given directory name. For example, typecd Desktop
to have the terminal navigate to the Desktop. You can double check that the terminal is actually at the desktop by typingls
and looking to see if you can see your javascript files.node <fileName>
- Runs the javascript code in the specified file. For example, typenode Program.js
to run the javascript code in the Program.js file.
Here are some other great resources for learning about javascript. Go ahead and create some new javascript files and try out some of the examples. Make sure your javascript file names end in .js