Skip to content

Commit 493c139

Browse files
committed
last attempt pushing sprint 2 files
1 parent 9f92cf3 commit 493c139

15 files changed

Lines changed: 18 additions & 14 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ count = count + 1;
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
77

8-
//Answer: The = means assignment. The value of count is 0 but it increments by 1
8+
//Answer: The = means assignment. The value of count is 0 but it increments by 1
9+
//CN - added comment to have a clean commit - updated

‎Sprint-2/1-key-exercises/2-initials.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ console.log(initials);
1313

1414
// https://www.google.com/search?q=get+first+character+of+string+mdn
1515

16-
// CN - added comment to have a clean commit
16+
// CN - added comment to have a clean commit. updated
17+

‎Sprint-2/1-key-exercises/3-paths.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ console.log(`The dir part of ${filePath} is ${dir}`);
2626
console.log(`The ext part of ${base} is ${ext}`);
2727

2828
// https://www.google.com/search?q=slice+mdn
29-
// CN - added comment to have a clean commit
29+
// CN - added comment to have a clean commit.

‎Sprint-2/1-key-exercises/4-random.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ console.log(num)
1313
// Answer: For calculations i utilised BODMAS formula solving numbers in brackets first, multiplication, subtraction and addition
1414
// I used 0.68 for math.floor(random number) + 1
1515
// Sum = 69
16-
// CN - added comment to have a clean commit
16+
// CN - added comment to have a clean commit .

‎Sprint-2/2-mandatory-errors/0.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// We don't want the computer to run these 2 lines - how can we solve this problem?
33

44
// I have commented out the lines. The computer removes commented lines from code compilation
5-
// CN - added comment to have a clean commit
5+
// CN - added comment to have a clean commit.

‎Sprint-2/2-mandatory-errors/1.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ console.log(age)
77

88
// The TypeError: Assignment to constant variable implies we are trying to reassign the variable twice.
99
// This case, I have used let instead in order to allow the variable to be reused.
10-
// CN - added comment to have a clean commit
10+
// CN - added comment to have a clean commit .

‎Sprint-2/2-mandatory-errors/2.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ console.log(`I was born in ${cityOfBirth}`);
77

88
// The error is ReferenceError: Cannot access 'cityOfBirth' before initialization
99
// Answer: I switched the order by declaring the const first before calling /printing
10+
// CN - added comment to have a clean commit .

‎Sprint-2/2-mandatory-errors/3.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ console.log(last4Digits)
1414
// Error returned: TypeError: cardNumber.slice is not a function
1515
// Lesson learnt here; slice method is only available for strings or arrays not numbers
1616
// So converted the cardNumber into a string first
17-
// CN - added comment to have a clean commit
17+
// CN - added comment to have a clean commit.

‎Sprint-2/2-mandatory-errors/4.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ console.log(twelveHourClockTime);
44
console.log(twentyFourHourClockTime);
55

66
// Error - SyntaxError: Invalid or unexpected token
7-
// lesson learnt - variables cannot start with a number
7+
// lesson learnt - variables cannot start with a number
8+
// CN - added comment to have a clean commit .

‎Sprint-2/3-mandatory-interpret/1-percentage-change.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ console.log(`The percentage change is ${percentageChange}`);
2828
//const percentageChange = (priceDifference / carPrice) * 100;
2929
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
3030
// e) cleans the amount format by removing characters such as , and leaving only number
31-
// CN - added comment to have a clean commit
31+
// CN - added comment to have a clean commit.

0 commit comments

Comments
 (0)