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

Conversation

@mabalal
Copy link

@mabalal mabalal commented Mar 11, 2023

No description provided.

- Hint: you can call the temperatureService function from your function
*/

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 😄

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.

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?

(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.

return /[0-9]/.test(str);
}

/*
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