WM4-Abdirahim-Hussein-JavaScript Core 1-Week-3 - #94
Conversation
|
|
||
| while (i < birthdays.length - 1) { | ||
| let birthdayCheck = birthdays[i]; | ||
| if (birthdayCheck.startsWith("July")) { |
There was a problem hiding this comment.
How about using 'includes' method?
There was a problem hiding this comment.
.starts with July! Always learning! I have used the .includes method but it is nice to see other ways of doing it
AlessandraCYF
left a comment
There was a problem hiding this comment.
Interesting addition of the j.
I, for example, just used sum = i * (i + 1); following from n(n+1) as the formula for calculating the sum of consecutive even numbers.
Pat-On
left a comment
There was a problem hiding this comment.
Hey. I see that You did great progress and you keep studying hard.
You understand the concept of for loop and the theory of why we may receive undefined.
Please finish the last parts of the exercises :)
| @@ -8,7 +8,8 @@ | |||
| // Change the below code to use a for loop instead of a while loop. | |||
| let i = 0; | |||
| while(i < 26) { | |||
There was a problem hiding this comment.
Please think over the logic of this solution because we got into the infinite loop and use only the while loop that should replace a for loop.
| ]; | ||
|
|
||
| // TODO - Write for loop code here | ||
| for (let i = 0; i <WRITERS.length; i++){ |
There was a problem hiding this comment.
I see that You understand the for loop logic. Nicely done!
| @@ -13,6 +13,12 @@ | |||
|
|
|||
| function getTemperatureReport(cities) { | |||
There was a problem hiding this comment.
You are very close to finishing this exercise.
Please think over it and modify your solution in the way that You are going to pass these test cases:
✕ should return a temperature report for the user's cities (10 ms)
✕ should return a temperature report for the user's cities (alternate input) (1 ms)
Tip: Check what exactly you are pushing in line 19 to the array.
| @@ -15,15 +17,26 @@ function potentialHeadlines(allArticleTitles) { | |||
| */ | |||
| function titleWithFewestWords(allArticleTitles) { | |||
There was a problem hiding this comment.
You are so close to solving the last two test cases.
Please improve your solution and pass the last two requirements:
✕ should return the title with the fewest words (1 ms)
✕ should return the average number of characters in a headline
| }); | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
Please finish last part of the exercise:
function highestPriceDescriptions(closingPricesForAllStocks, stocks) {
// TODO
}
No description provided.