Skip to content

Commit 08aad71

Browse files
authored
clarifing the codes in line 1 and 3
1 parent 872131a commit 08aad71

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
@@ -4,7 +4,9 @@ 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+
78
Answer
9+
810
// Line 3; when we the right side first count in the right side is considered as 0 so 0+1 will be 1.
911
// But the = sign does not mean the mathematical equal, its function is to take the result on the right and store it on the left.
1012
// Therefore if we write the same code in next line the result is not one but 2

0 commit comments

Comments
 (0)