This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This lets us get user input | |
/* Codecademy documentation: | |
https://www.codecademy.com/articles/getting-user-input-in-node-js | |
*/ | |
const prompt = require('prompt-sync')({sigint: true}); | |
// This lets us clear the screen after every turn | |
// need to run `npm install clear-screen` in the | |
// terminal first | |
const clear = require('clear-screen'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let target; | |
const humanGuessInput = document.getElementById('human-guess'); | |
const roundNumberDisplay = document.getElementById('round-number'); | |
const computerGuessDisplay = document.getElementById('computer-guess'); | |
const humanScoreDisplay = document.getElementById('human-score'); | |
const computerScoreDisplay = document.getElementById('computer-score'); | |
const targetNumberDisplay = document.getElementById('target-number'); |