We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b69dad commit 750eb80Copy full SHA for 750eb80
chapter8/battleship.js
@@ -147,7 +147,8 @@ function parseGuess(guess) {
147
if (guess === null || guess.length !== 2) {
148
alert("Oops, please enter a letter and a number on the board.");
149
} else {
150
- var row = alphabet.indexOf(guess.charAt(0));
+ var firstChar = guess.charAt(0);
151
+ var row = alphabet.indexOf(firstChar);
152
var column = guess.charAt(1);
153
154
if (isNaN(row) || isNaN(column)) {
0 commit comments