Skip to content

Commit 04fc9fa

Browse files
committed
Properly orient chessboard in exercise 2.3
1 parent aa47c37 commit 04fc9fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

02_program_structure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,14 +980,14 @@ should form a chess board.
980980
Passing this string to `console.log` should show something like this:
981981

982982
----
983-
# # # #
984983
# # # #
985984
# # # #
986985
# # # #
987986
# # # #
988987
# # # #
989988
# # # #
990989
# # # #
990+
# # # #
991991
----
992992

993993
When you have a program that generates this pattern, define a

code/solutions/02_3_chess_board.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var board = "";
55
for (var y = 0; y < size; y++) {
66
for (var x = 0; x < size; x++) {
77
if ((x + y) % 2 == 0)
8-
board += "#";
9-
else
108
board += " ";
9+
else
10+
board += "#";
1111
}
1212
board += "\n";
1313
}

0 commit comments

Comments
 (0)