Skip to content

Instantly share code, notes, and snippets.

@peterjacobson
peterjacobson / gra.js
Last active December 8, 2022 20:29
A simple number guessing game in node.js
//var process = require('process');
var readline = require('readline');
var randomNumber = Math.round(Math.random() * 10);
var lives = 5;
var terminal = readline.createInterface(
{
input : process.stdin,
output : process.stdout