Skip to content

Commit 05b2ad7

Browse files
feat: solved 2nd stage of the Hyperskill project "Hangman"
1 parent 522a960 commit 05b2ad7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

hyperskill/09_hangman/02/.gitkeep

Whitespace-only changes.

hyperskill/09_hangman/02/main.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const input = require('sync-input')
2+
3+
const title = `H A N G M A N`
4+
console.log(title)
5+
6+
const word = "python"
7+
const guess = input("Guess the word: ")
8+
9+
if (guess === word) {
10+
console.log("You survived!")
11+
} else {
12+
console.log("You lost!")
13+
}

0 commit comments

Comments
 (0)