Skip to content

Commit a9cdb3c

Browse files
committed
Added increment explanation + completed 1-count.js
1 parent 124ae45 commit a9cdb3c

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
@@ -4,3 +4,8 @@ count = count + 1;
44

55
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
66
// Describe what line 3 is doing, in particular focus on what = is doing
7+
// This line (line 3), is updating the value of the count variable. The = operator is an assignment
8+
// operator which assigns the value on the right (count + 1) to the variable on the left (count).
9+
// count = count + 1;
10+
// This operation is called increment.
11+
// An increment means increasing the value of a variable by 1.

0 commit comments

Comments
 (0)