Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sprint-1/1-key-exercises/1-count.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@ count = count + 1;

// Line 1 is a variable declaration, creating the count variable with an initial value of 0
// Describe what line 3 is doing, in particular focus on what = is doing
/*Line 3 is updating the value of the variable `count`.
The `=` operator is an assignment operator,
which means it takes the value on the right side
(in this case, `count + 1`)
and assigns it to the variable on the left side (`count`).
So, it takes the current value of `count`, adds 1 to it,
and then stores that new value back into `count`.
in general, Line 3 is incrementing the value of `count` by 1.
*/

Loading