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
mabalal wants to merge 1 commit into
CodeYourFuture:mainfrom
mabalal:London-10/Mahendra-Balal/Javascript-core-1-coursework-week3
Open

London-10/Mahendra-Balal/JavaScript-core-1/Coursework/Week-3#265
mabalal wants to merge 1 commit into
CodeYourFuture:mainfrom
mabalal:London-10/Mahendra-Balal/Javascript-core-1-coursework-week3

Conversation

@mabalal

Copy link
Copy Markdown

No description provided.

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

function getTemperatureReport(cities) {

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 😄

Comment thread2-mandatory/2-financial-times.js
@moneyinthesky

Copy link
Copy Markdown
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 👍

@moneyintheskymoneyinthesky added the reviewed A mentor has reviewed this code label Mar 15, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

reviewedA mentor has reviewed this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mabalal@moneyinthesky