Skip to content

Commit 9db28b2

Browse files
Added notes to described what the code on line 3 is doing
1 parent 3372770 commit 9db28b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
let count = 0;
22

33
count = count + 1;
4+
console.log(count);
45

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+
9+
// Line 3 is reassigning the value of the count variable to the result of the expression count + 1.
10+
// The = operator is the assignment operator, which assigns the value on the right-hand side
11+
// (the result of count + 1) to the variable on the left-hand side (count).
12+
// This increments the value of count by 1.

0 commit comments

Comments
 (0)