Skip to content

Commit 5ab71ca

Browse files
committed
update explanation on line 3 about = operator
1 parent 7590fd3 commit 5ab71ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-1/exercises/count.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
1+
// Line 1 is a variable declaration, creating the count variable with an initial value of 0.
22
// Describe what line 3 is doing, in particular focus on what = is doing
3+
// Line 3 updates the value of count by taking its current value, adding 1 to it,
4+
// and then using the assignment operator (=) to store the new value back into count.
35

46
let count = 0;
57

68
count = count + 1;
79
console.log(count);
810

9-
// line 3 is taking the first value and reassigns this new value to count its value + the number 1
10-

0 commit comments

Comments
 (0)