Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@cjyuan Please review my pull request |
abdishakoor-dev
left a comment
There was a problem hiding this comment.
Your key exercise answers are all correct, and every file runs. The interpret answers are clear and accurate too.
Two things before I can mark this Complete:
-
2-mandatory-errors/1.jsto4.jshave a fix, but no explanation. For each file, write a comment that says:- why the original code failed
- which error it was. The prep shows three error names: SyntaxError, TypeError and ReferenceError.
3.jsalso asks for your prediction, and if it matched. See my comment on each file. -
3-mandatory-interpret/2-time-format.jsanswer f): try more values. See my comment.
Add the Needs Review label again once you have pushed.
| // trying to create an age variable and then reassign the value by 1 | ||
|
|
||
| const age = 33; | ||
| let age = 33; |
There was a problem hiding this comment.
The fix works. Why did the original line fail? Which of the three error names was it?
|
|
||
| console.log(`I was born in ${cityOfBirth}`); | ||
| const cityOfBirth = "Bolton"; | ||
| console.log(`I was born in ${cityOfBirth}`); |
There was a problem hiding this comment.
Good fix. Why did the original order fail? Which error was it?
| @@ -1,5 +1,5 @@ | |||
| const cardNumber = 4533787178994213; | |||
| const last4Digits = cardNumber.slice(-4); | |||
| const last4Digits = cardNumber.toString().slice(-4); | |||
There was a problem hiding this comment.
Good fix. This one asks for a prediction first. What did you expect to go wrong? What error did node give? Did it match your prediction? Write your answers below line 9.
| @@ -1,2 +1,2 @@ | |||
| const 12HourClockTime = "8:53pm"; | |||
| const 24hourClockTime = "20:53"; | |||
| const twelveHourClockTime = "8:53pm"; | |||
There was a problem hiding this comment.
Good names. Why could the original names not be used? Which error was it?
|
|
||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
| // Answer: No, it will not format all values correctly. | ||
| // For example, single-digit minutes or seconds will not have a leading zero. |
There was a problem hiding this comment.
Good, the missing zeros are one problem. Now try -90 and 90.5. What does each one print? Would you show a time that way?

Learners, PR Template
Self checklist
Task code
CYF-1039
Changelist
Completed the Sprint 2 JavaScript Fundamentals coursework, including the key exercises, mandatory errors, and mandatory interpret exercises.