-
-
Notifications
You must be signed in to change notification settings - Fork 283
London-10/Mahendra-Balal/JavaScript-core-1/Coursework/Week-3 #265
base: main
Are you sure you want to change the base?
London-10/Mahendra-Balal/JavaScript-core-1/Coursework/Week-3 #265
Conversation
@@ -12,7 +12,14 @@ | |||
*/ | |||
|
|||
function getTemperatureReport(cities) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks perfect! Good job 😄
@@ -5,33 +5,69 @@ | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation here looks good 👍
I would suggest giving the ARTICLE_TITLES
a different name. It may be confusing because there's another variable with the same name on this page.
Can you think of a different name for it?
/* | ||
The editor of the FT likes short headlines with only a few words! | ||
Implement the function below, which returns the title with the fewest words. | ||
(you can assume words will always be seperated by a space) | ||
(you can assume words will always be separated by a space) | ||
*/ | ||
function titleWithFewestWords(allArticleTitles) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good attempt. I think there is one small problem with this code.
We want to look for the article with the fewest words. Have a think about what .split("")
does in your code.
} | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 👍
I like how you used another function to help you solve the problem 😄
This was a good effort @mabalal |
No description provided.