London 9-Sana Asaf- JavaScript-Core-1-Coursework-Week3 - #197
Conversation
SallyMcGrath
left a comment
There was a problem hiding this comment.
Thanks for this @SanaAsaf . I can see you've put a lot of effort into this coursework and I really appreciate it.
This is looking pretty good. I've made a few comments and asked a few questions. Have a look and have a think about it. Thanks again! ⭐
|
|
||
| function getTemperatureReport(cities) { | ||
| // TODO | ||
| let temparatureStatements = []; |
There was a problem hiding this comment.
Typo here! Typos in variable names often cause bugs so it's really worth picking them up. There is a spellchecker package you can install in VSCode https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
| function getTemperatureReport(cities) { | ||
| // TODO | ||
| let temparatureStatements = []; | ||
| for (let i = 0; i < cities.length; i++){ |
There was a problem hiding this comment.
When you get the solutions for this week, take a look at the example solution. Yours works and is a correct answer; the mentor chose a different strategy. Can you think what the advantages of the mentor's choices are?
| @@ -10,7 +10,11 @@ function generateRandomNumber() { | |||
| } | |||
|
|
|||
| function getRandomNumberGreaterThan50() { | |||
There was a problem hiding this comment.
This solution works well.
Have you installed Prettier and run it in your VSCode? What does the style guide say about this? https://syllabus.codeyourfuture.io/guides/code-style-guide#using-prettier-to-format-code-automatically
| function potentialHeadlines(allArticleTitles) { | ||
| // TODO | ||
| let checkedArticleTitles=[]; | ||
| for (let i = 0; i < allArticleTitles.length; i++) { |
There was a problem hiding this comment.
This works well and is a correct answer.
When you look at the solutions, the mentor used a different kind of loop. Can you think why?
| */ | ||
| function getAveragePrices(closingPricesForAllStocks) { | ||
| // TODO | ||
| /* let sum=0; |
There was a problem hiding this comment.
This code seems to be commented out!
No description provided.