London | 26-ITP-May | Damilola Odumosu | Sprint 1 | Coursework#1364
London | 26-ITP-May | Damilola Odumosu | Sprint 1 | Coursework#1364d-odumosu wants to merge 12 commits into
Conversation
| //line 3: we are re-assigning count using the assignment operator (=). The " = " is used in JavaScript to assing a value | ||
| // to a variable and in this case we are re-assinging count to equal count + 1. No newline at end of file |
There was a problem hiding this comment.
Operation like count = count + 1 is very common in programming, and there is a programming term describing such operation.
Could you find out what one-word programming term describes the operation on line 3?
| const dir = filePath.slice(1 , 44); | ||
| console.log(dir) | ||
| const ext = filePath.slice(lastSlashIndex + 5 ); | ||
| console.log(ext) |
There was a problem hiding this comment.
Could you explore an approach that could work for any valid file path? For examples,
/tmp/interpret/file.json and /Users/mitch/cyf/Module-JS1/mycode.js.
| const _12HourClockTime = "8:53pm"; | ||
| const $24hourClockTime = "20:53"; |
There was a problem hiding this comment.
Identifiers that begin with _ or $ are valid variable, function, class, and property names. However, they are usually used by convention to signal special meaning.
Could you explore names that start with alphabets instead? Feel free to ask AI for suggestion.
| // line 12 console,log() | ||
|
|
||
| // b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem? | ||
| //A syntaxError is occurring on line 5, we are missing a "," and a closing ")" |
There was a problem hiding this comment.
We can more precisely describe "A comma is missing between "," and "" in the function call" as:
A comma is missing between the ___________s.
What is the programming term that belongs in the blank?
Note: The original code does not have a missing closing ")".
|
|
||
| //runTime |
There was a problem hiding this comment.
runTime reads like "runtime", which has a different meaning in IT. Could you suggest a different (and more descriptive) name?
|
Regarding your PR description, could you update the checkboxes to make them look like
instead of like
Relevant resource: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-tasklists |
Learners, PR Template
Self checklist
Changelist
I have completed the coursework requirements