Skip to content

Commit 577235d

Browse files
committed
decribed what line 3 is doing in count.js excercise
1 parent 3372770 commit 577235d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ 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+
8+
/*
9+
Line 3 is re-assigning the variable "count" with a new value that increases the previous value by 1
10+
11+
*/

prep/example.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// This are declarations
2+
const firstName = "Jane";
3+
const lastName = "Doe";
4+
const yearOfBirth = 1971;
5+
let currentYear =2026;
6+
7+
//This are statements
8+
currentYear++;
9+
10+
const introduction = `Hi, my name is ${firstName} ${lastName}, I am ${currentYear - yearOfBirth} years old.`; //saving return values
11+
console.log(introduction);
12+

0 commit comments

Comments
 (0)