Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

London-10/Mahendra-Balal/JavaScript-core-1/Coursework/Week-3 #265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mabalal
Copy link

@mabalal mabalal commented Mar 11, 2023

No description provided.

@@ -12,7 +12,14 @@
*/

function getTemperatureReport(cities) {
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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.

}

/*
Copy link
Contributor

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 😄

@moneyinthesky
Copy link
Contributor

This was a good effort @mabalal
When you have some time - you can try to complete the remaining exercises 😄 I think you'll be able to do it 👍

@moneyinthesky moneyinthesky added the reviewed A mentor has reviewed this code label Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
reviewed A mentor has reviewed this code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants