Skip to content

Commit e8a1bf4

Browse files
committed
Merge branch 'coursework/sprint-1' of https://github.com/djebsoft/Module-Structuring-and-Testing-Data into coursework/sprint-1
2 parents b3b93d6 + 3438d6e commit e8a1bf4

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit b3b93d6eb577d38611a4d2751769f7996b4446ab

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ let count = 0;
33
count = count + 1;
44

55
// Line 1 is a variable declaration, creating the count variable with an initial value of 0
6-
// the third line used the the assignment operator '=' to reassign the variable count to the initial value which is zero incremented by one resulting to the value 1
6+
// the third line used the assignment operator '=' to reassign the variable count to the initial value which is zero incremented by one resulting to the value 1

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ let lastName = "Johnson";
55
// Declare a variable called initials that stores the first character of each string.
66
// This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution.
77

8-
let initials = firstName.charAt(0)+middleName.charAt(0)+lastName.charAt(0);
8+
let initials = firstName.charAt(0) + middleName.charAt(0) + lastName.charAt(0);
99
// or
10-
let initials = firstName[0] + middleName[0] + lastName[0];
10+
//let initials = firstName[0] + middleName[0] + lastName[0];
1111
// or but rarely used and not recommended because it might cause bugs
12-
let initials = firstName[0].concat(middleName[0], lastName[0]);
12+
//let initials = firstName[0].concat(middleName[0], lastName[0]);
1313

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ console.log(`The base part of ${filePath} is ${base}`);
1717
// Create a variable to store the dir part of the filePath variable
1818
// Create a variable to store the ext part of the variable
1919

20-
const dir = filePath.slice(0,lastSlashIndex+1);
20+
const dir = filePath.slice(0, lastSlashIndex + 1);
2121
const ext = filePath.slice(-3); //the extention of the file is always the last three characters in the path
2222
//or
23-
const lastPointIndex = filePath.lastIndexOf(".");
24-
const ext = filePath.slice(lastPointIndex+1);
23+
//const lastPointIndex = filePath.lastIndexOf(".");
24+
//const ext = filePath.slice(lastPointIndex+1);
2525

2626
// https://www.google.com/search?q=slice+mdn

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
1212
// the num assigned to a value that's in the dor of an expression
1313
// the math object is invoked to perform some mathematical tasks
1414
// the random method is invoked to get a random number between 0 and 1
15-
// the random number is multiplied by 100
15+
// the random number is multiplied by 100
1616
// the floor method is invoked to round down the result to its nearest integer
1717
// added one to the new result
1818
// the final result of the whole expression is what the variable num assigned to
1919
/* after applying the program several times, I got the idea that the program is generating
20-
a value to the num variable thats always between minimum an maximum*/
20+
a value to the num variable thats always between minimum an maximum*/

0 commit comments

Comments
 (0)