Conversation
…ory implement and mandatory interpret folders
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| console.log(capitalise("beautiful")); | ||
|
|
||
| // =============> write your explanation here | ||
| // function is assigned 2 arguments/values=============> write your explanation here |
There was a problem hiding this comment.
Please review the error message again and update the explanation. Think about what the error message is about and why it needs to be fixed.
| console.log(decimalNumber); | ||
|
|
||
| // =============> write your explanation here | ||
| // decimalNumber has been declared as a function and a variable within function scope=============> write your explanation here |
There was a problem hiding this comment.
decimalNumber is not a function.
Please review the explanation again and think about the following question and finally update the explanation.
- how is a function declaration different than a variable?
- what are function arguments and parameters?
- can a function variable and parameter have the same name?
| // Syntax errorError Unexpected number.=============> write the error message here | ||
|
|
||
| // =============> explain this error message here | ||
| // Means Function identifier should be a name not a number =============> explain this error message here. |
There was a problem hiding this comment.
Whats the difference between function identifier and parameter?
There was a problem hiding this comment.
I think you're confused between the function identifiers, parameters and arguments.
please review the following and update the explanation.
|
|
||
| // =============> write your explanation here | ||
|
|
||
| //The 2nd console log returned value value is undefined. I have added a return function to output the multiply value. |
There was a problem hiding this comment.
why was the value returned by the function is undefined?
| console.log(`The sum of 10 and 32 is ${sum(10, 32)}`); | ||
|
|
||
| // =============> write your explanation here | ||
| // Maybe that unassigned return; may cause the code not to run fully =============> write your explanation here |
There was a problem hiding this comment.
When you don't understand how or why a particular part of the code works or behaves in a certain way, it's best to dig a little deeper so you can build a solid understanding of it.
Please review the following MDN documentation on the return statement to help you understand how function returns work:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return
| // return the BMI of someone based off their weight and height | ||
| } | ||
|
|
||
| function calculateBMI(weight, height) { |
There was a problem hiding this comment.
pleaser review the formula for calculating the BMI in the description above again.
| // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
|
|
||
| function toUpperSnakeCase(text) { | ||
| return text.trim().replace(/\s+/g, "_").toUpperCase(); |
There was a problem hiding this comment.
is there a need to use trim and regex pattern here? is there an easy of achieving this without using them?
| console.log(`£${pounds}.${pence}`);*/ | ||
|
|
||
| // Revised code: | ||
| function poundsToPence(penceString) { |
|
|
||
| // c) What is the return value of pad when it is called for the first time? | ||
| // =============> write your answer here | ||
| 0; |
| // Syntax errorError Unexpected number.=============> write the error message here | ||
|
|
||
| // =============> explain this error message here | ||
| // Means Function identifier should be a name not a number =============> explain this error message here. |
There was a problem hiding this comment.
I think you're confused between the function identifiers, parameters and arguments.
please review the following and update the explanation.
|
|
||
| function calculateBMI(weight, height) { | ||
| // return (weight / height).toFixed(1); - 1st attempt | ||
| return (weight / (height * height)).toString().slice(0, 4); |
There was a problem hiding this comment.
thats the correct formula now, however do you need to use .toString() and .slice() for getting fixed decimal points? is there an easier way of doing it without converting the value to string?
| console.log(text); | ||
|
|
||
| // Trim and regex pattern was the only saving grace I came across to resolve the underscore issue I had spent hours researching. | ||
| // I have however now modified and replaced the pattern for easy understanding with AI's help |
There was a problem hiding this comment.
I appreciate your transparency. Using AI as a tool for research and to help clarify concepts you're struggling with is absolutely fine. You can find further guidance on the appropriate use of AI in the document below.

Self checklist
Task code
CYF-1053
Changelist
30/09 - Corrected issues from run 1
I have updated all Sprint-3 files in the key errors, mandatory debug, mandatory implement and mandatory interpret folders