NW5-Ahmed_Mahmoud-JavaScript-Core-1-Coursework-Week3 - #137
Conversation
| // Example 4 | ||
| let arr = [1,2,3]; | ||
| console.log(arr[3]); | ||
| console.log(arr[3]);// because the arr has 3 item and the firest item start with 0 and 1 and 2 but there is no for item. |
There was a problem hiding this comment.
I think you mean similar to me, //in this example we don't have arr[3], because we just have [0],[1].[2]and we don't have it.
| function evenNumbersSum(n) { | ||
| // TODO | ||
| } | ||
| const ourArray = []; |
There was a problem hiding this comment.
Hey Danti, I can see the approach your going for here, but it looks like you forgot to include some code - this file doesn't run and references a missing function sumEvens
|
|
||
| do { | ||
| generatedNumber = generateRandomNumber(); | ||
| } while(generatedNumber <= 50); |
There was a problem hiding this comment.
The exercie says number greater than 50 not greater than or equal so please try to stick in with reqirements. I know as small issue but it will help you to stick to exact instructions, you do generatedNumber < 50 not this generatedNumber <= 50
| */ | ||
| function titleWithFewestWords(allArticleTitles) { | ||
| // TODO | ||
| let fewestWordsSoFar; |
There was a problem hiding this comment.
Always a good idea to assign the number var to 0 to avoid random number being put into the variable by the js compiler
so make like this let fewestWordsSoFar = 0;
Homework Details