Skip to content

Commit 21f7d70

Browse files
committed
Sprint 1 exercises: explain assignment in 1-count.js
1 parent c106376 commit 21f7d70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sprint-1/1-key-exercises/1-count.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@ let count = 0;
22

33
count = count + 1;
44

5+
console.log(count);
6+
57
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
68
// Describe what line 3 is doing, in particular focus on what = is doing
9+
10+
// Line 3 takes the current value of count (0), adds 1 to it,
11+
// and assigns the result (1) back to the count variable using =.

0 commit comments

Comments
 (0)