Skip to content

Commit cc4ee1c

Browse files
committed
added Line 3 desc + checked output of expression
1 parent 51decb7 commit cc4ee1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ 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+
// Line 3 is (incrementing variable 'count' by 1) i.e updating the value of the count variable by adding 1 to its current value.
8+
// The = (assignment) operator is used to assign the new value (count + 1) back to the count variable.
9+
// Meaning, 'count' variable now has a new value of 1.
10+
console.log(count); // outputs 1

0 commit comments

Comments
 (0)