Rock, Paper, Scissors Setup

Open your Terminal application and navigate to your ~/code/ga/lectures directory:

cd ~/code/ga/lectures

Make a new directory called javascript-browser-game-rock-paper-scissors, then enter this directory:

mkdir javascript-browser-game-rock-paper-scissors
cd javascript-browser-game-rock-paper-scissors

Then, create an app.js and an index.html file. These files will hold your work for this lecture:

mkdir js css
touch index.html js/app.js css/style.css

With the files created, open the contents of the directory in VS Code:

code .

Open the index.html file and add HTML boilerplate. Then make use of the app.js file by adding this line inside the <head> tag:

<script defer src="./js/app.js"></script>

With this setup complete, we’ll have two methods at our disposal for executing the code we write in app.js:

node app.js

While either method is acceptable, you should use the same method as your instructor for simplicity.