London | 26-ITP-Jan | Alex Okorefe| Sprint 2 | Coursework#1107
London | 26-ITP-Jan | Alex Okorefe| Sprint 2 | Coursework#1107Alex-Os-Dev-Lab wants to merge 12 commits intoCodeYourFuture:mainfrom
Conversation
…mments for clarity
…mentation in convertToPercentage
… error explanations
…date comments for clarity
… code accordingly
…provide answers to questions
Sprint-2/1-key-errors/1.js
Outdated
|
|
||
| // Why will an error occur when this program runs? | ||
| // =============> write your prediction here | ||
| // =============> It will likely be a reference error because the variable decimalNumber is not defined in the global scope |
There was a problem hiding this comment.
Good try. Try the prediction again.
Tip: this is the problem
const decimalNumber = 0.5;
Try to find out why. If you understand this, you would correctly give the correct code.
There was a problem hiding this comment.
Thanks for flagging I realised that because the program will start with the console.log statement and look for the decimalNumber variable. We are going to get a syntax error before we get to anything else.
I have updated the code and comments to reflect. Let me know if there are any further issues; or if I can resubmit the PR for review.
Thanks
Updated the explanation for the error and corrected the function declaration to avoid syntax errors.
|
It says your branch has conflicts. Can you review that? @Alex-Os-Dev-Lab |
Hi JaypeeLan I believe I have resolved this issue now. Are you able to mark as complete please. That said if there are any issues please let me know |
Learners, PR Template
Self checklist
Changelist
Made necessary changes to all files associated with Sprint 2 in order to complete assignments.
Questions
No questions at this stage