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

Conversation

@Elenar9
Copy link

@Elenar9 Elenar9 commented Mar 15, 2023

Mandatory exercise done

@Elenar9
Copy link
Author

Elenar9 commented Mar 15, 2023

Mandatory done

}
return arr;

} let arr = [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have the same code copied twice here, maybe this was an accident?

// TODO
}

let arr = [];
Copy link
Contributor

@moneyinthesky moneyinthesky Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your implementation here looks good 👍
You are adding the value returned by temperatureService to the array arr.
The question wants you to take this value, and put it into a string - like "The temperature in London is 10 degrees".
Can you think of how to create a string like this using the value you get back from the temperatureService?
One idea is to use template literals in JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
When you have created this string - you could add that to the array instead 😄

The home page of the web site has a headline section, which only has space for article titles which are 65 characters or less.
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.

Looks like you have the same function name defined twice here? function potentialHeadlines(allArticleTitles) {

@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