Skip to content

Commit 63c55f5

Browse files
committed
amendment , removing wrong committed file
1 parent 84027f2 commit 63c55f5

File tree

6 files changed

+8
-51
lines changed

6 files changed

+8
-51
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ 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-
//Line 3 of the code reassigns a value to the declared variable count.
8-
// the programming term for this is called increment
7+
//Line 3 of the code assigns a value to the declared variable count.
98
// The = sign is an assignment operator, without line 3, the declared variable wil be undefined.

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ 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[0]}${middleName[0]}${lastName[0]}`;
9-
console.log(initials); //CJK
8+
let initials = `${firstName[0]}+${middleName}+${lastName}`;
109

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

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99

1010
// (All spaces in the "" line should be ignored. They are purely for formatting.)
1111

12-
const filePath = "/Users/mitch/cyf/Module-JS1/week-1/interpret/package.json";
12+
const filePath = "/Users/mitch/cyf/Module-JS1/week-1/interpret/file.txt";
1313
const lastSlashIndex = filePath.lastIndexOf("/");
1414
const base = filePath.slice(lastSlashIndex + 1);
1515
console.log(`The base part of ${filePath} is ${base}`);
1616

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
19-
const lastDotIndex = filePath.lastIndexOf(".");
20-
const dir = filePath.slice(0, lastSlashIndex);
21-
const ext = filePath.slice(lastDotIndex + 1);
22-
console.log(dir);
23-
console.log(ext);
2419

25-
// https://www.google.com/search?q=slice+mdn
20+
const dir =filePath.slice(0,filePath.length-base.length-1) ;
21+
const ext = filePath.slice(-3);
22+
23+
// https://www.google.com/search?q=slice+mdn

Sprint-1/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
> There is often a step by step video you can code along with too.
99
> Do the prep.
1010
11-
This README will guide you through the different sections for this week.
11+
This README will guide you through the different sections for this week.
1212

1313
## 1 Exercises
1414

Sprint-3/2-practice-tdd/count.test.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)