Open Dujota opened 3 years ago
i recommend do one letter at a time.
so start with a simple if statement
if(letter === 'e'){
// update the 2 blanks and add 1 to correctAnswr then remove the button
}else{
add 1 to wrong aswer and remove the button
}
once that starts to take shape you can add the next letter 'l' into an else if(){} and work your way up
https://github.com/rudilone/Hangman/blob/a8db57c7307f266c70cfe40082ff58e0490e7fac/script.js#L48
so this event listener is almost there
you would modify it just a bit: