London10_Anna-Hrychaniuk_JavaScript-Core-1-Coursework-Week3 - #232
London10_Anna-Hrychaniuk_JavaScript-Core-1-Coursework-Week3#232AnnaFYZ wants to merge 6 commits into
Conversation
| @@ -12,7 +12,13 @@ | |||
| */ | |||
|
|
|||
| function getTemperatureReport(cities) { | |||
| @@ -5,7 +5,13 @@ | |||
| Implement the function below, which will return a new array containing only article titles which will fit. | |||
| */ | |||
| function potentialHeadlines(allArticleTitles) { | |||
There was a problem hiding this comment.
Nice one 😄
As an extra exercise, could you try re-writing this with the filter array method?
| @@ -23,15 +39,30 @@ function titleWithFewestWords(allArticleTitles) { | |||
| (Hint: remember that you can also loop through the characters of a string if you need to) | |||
| */ | |||
| function headlinesWithNumbers(allArticleTitles) { | |||
There was a problem hiding this comment.
Very nice and simple solution.
| @@ -34,7 +34,18 @@ const CLOSING_PRICES_LAST_5_DAYS_FOR_ALL_STOCKS = [ | |||
| Functions can help with this! | |||
| */ | |||
| function getAveragePrices(closingPricesForAllStocks) { | |||
There was a problem hiding this comment.
This looks good to me.
One small point: try to keep an eye on indentation, as it will improve readability for other developers.
| @@ -48,7 +59,13 @@ function getAveragePrices(closingPricesForAllStocks) { | |||
| The price change value should be rounded to 2 decimal places, and should be a number (not a string) | |||
| */ | |||
| function getPriceChanges(closingPricesForAllStocks) { | |||
There was a problem hiding this comment.
This looks good as well.
One small comment: Maybe item is not the best variable name here, something like prices will give the reader of the code a bit more information.
| @@ -64,7 +81,24 @@ function getPriceChanges(closingPricesForAllStocks) { | |||
| The price should be shown with exactly 2 decimal places. | |||
| */ | |||
| function highestPriceDescriptions(closingPricesForAllStocks, stocks) { | |||
There was a problem hiding this comment.
Good work on this one 👍
In case you're interested, JavaScript also gives us something you might find useful here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max
| * - Return only the frequencies that are radio stations. | ||
| */ | ||
| // `getStations` goes here | ||
| function getStations () { |
There was a problem hiding this comment.
Nice solution 👍
For practice, can you re-write this using the filter array method?
|
Great job on this coursework @AnnaFYZ |
|
Thank you very much for reviewing, recommendations and feedback :) |
No description provided.