Skip to content

Commit 12eb682

Browse files
committed
update: Add console log and comments to clarify count variable reassignment sprint -1 of 1-count.js
1 parent 4c2c13b commit 12eb682

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

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

33
count = count + 1;
44

5+
console.log(count); // Output: 1
56
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
67
// Describe what line 3 is doing, in particular focus on what = is doing
8+
//Line 3 is reassigning the count variable to a new value which is the current value increment by 1, "=" is assigning operator that assigning value of right side which mens count increment 1 to the left side value of count variable

0 commit comments

Comments
 (0)