South Africa Class_1 - Jonathan Heugh - JavaScript-Core-1 - Week 1 - #41
South Africa Class_1 - Jonathan Heugh - JavaScript-Core-1 - Week 1#41Jontas77 wants to merge 9 commits into
Conversation
Completed exercises A - J
Completed exercises and mandatory folders
| return greet; | ||
| } | ||
|
|
||
| var result = myGreeting ('HELLO') + ' ' + mentor1.toUpperCase(); |
There was a problem hiding this comment.
You should have put these repeated statements in a method, because the method actually does nothing
There was a problem hiding this comment.
Hi thank you for your review I will go back and make the necessary changes
ShawenHarker
left a comment
There was a problem hiding this comment.
Hi Jontas,
Firstly I would like to say your code is super clean bud, well done on that man but on a more serious note, I would like to point your parameters for your functions, can you give it more descriptive names please, as "s" and "m" makes the code a bit harder to read, especially if you doing a quick scan through your code, other than that, well done man.
Keep up the good work!!!
| // Add comments to explain what this function does. You're meant to use Google! | ||
| // This function get a random number between 0 and 1 inclusive 0 but not 1 multiply by 10 | ||
| function getNumber() { | ||
| return Math.random() * 10; |
There was a problem hiding this comment.
Hey there great stuff on the previous work however....
-
So when you use
Math.random() * 10this won't really guarantee giving you whole number 1-10 (Note the question was ambiguous as to are floating number required but if for instance only whole numbers were needed) this would not generate one from what I know I stand to be corrected -
To generate random whole number from 0-10 code would look like this below:
Math.floor(Math.random() * 10)There was a problem hiding this comment.
Hi Ntshembo thank you for your review I will go back and make the necessary changes.
Hi Shawen thank you for your review I will go back and make the necessary changes. |
Add changes to C-variables, L-functions and extra exercises 1 and 2
ezekiel444
left a comment
There was a problem hiding this comment.
Nice one. But everything seems so unreal with the consistent deletion of questions, instructions and even test cases then pasting of answers.
ezekiel444
left a comment
There was a problem hiding this comment.
extra-2-piping: "const startingValue = 2 + 10; let result = startingValue * 2; let formatResult = '£' + result"; bad practice to define everything in same line. Nice work.
| return '£' + numC.toString(); | ||
| } | ||
|
|
||
| const startingValue = 2 + 10; let result = startingValue * 2; let formatResult = '£' + result; |
There was a problem hiding this comment.
it is bad practice to define everything on a single line
|
Your coursework submission has been closed because nobody has interacted with it in six weeks. You are welcome to re-open it to get more feedback. |
Your Details
Homework Details