Skip to content

Commit 2bf18ae

Browse files
committed
Added increment explanation
1 parent 15e22b2 commit 2bf18ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ let count = 0;
33
count = count + 1;
44

55
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
6-
// Describe what line 3 is doing, in particular focus on what = is doing
7-
// Line 3 updates the value of count.
8-
// The = means “set count to a new value”, which is the old value plus 1.
6+
// I see that line 3 performs an increment operation.
7+
// It increases the value of count by 1 and assigns the new value back to the variable.
8+
// The = is the assignment operator — it assigns the result of (count + 1) back to count.

0 commit comments

Comments
 (0)