Skip to content

Commit 311020e

Browse files
Update program_structure_chess_board_3_1.js
1 parent 2a9cd7b commit 311020e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

program_structure_chess_board_3_1.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
for (var row = 0; row < 8; row++) {
22
var str = '';
3-
for (var col = 0; col < 8; col++) {
4-
if ((row % 2) == (col % 2)) {
5-
str += '#';
6-
} else {
7-
str += '_';
8-
}
3+
for (var col = 0; col < 8; col++) {
4+
if ((row % 2) == (col % 2)) {
5+
str += '#';
6+
} else {
7+
str += '_';
98
}
10-
console.log(str);
11-
}
9+
}
10+
console.log(str);
11+
}

0 commit comments

Comments
 (0)