ZA2-Harerimana-Dieudonne/JavaScript-Core-1Coursework-Week3 - #74
ZA2-Harerimana-Dieudonne/JavaScript-Core-1Coursework-Week3#74diegoharera wants to merge 1 commit into
Conversation
lexyking
left a comment
There was a problem hiding this comment.
Great job overall. Please have a look at the comments left
| let arr = [1,2,3]; | ||
| console.log(arr[3]); | ||
| // console.log(arr[2]) | ||
| //On the console have selected a number in the array which doesn't exit. javascript counts starting from 0 |
| console.log(x); | ||
| } else { | ||
| // console.log("nothing"); | ||
| } |
There was a problem hiding this comment.
Nice try, but it doesn't cover all the use cases.
Hint: if you create an array where you stock all the first n even values, using the length of that value as a stopping condition for your while loop, it will be easier to display then
| capture += index; | ||
| console.log(index); | ||
| } | ||
| } |
There was a problem hiding this comment.
Not quite right. Please have a second look.
Hint: Try to use a return value in the function
| let sum = message + capture[i]; | ||
| console.log(sum); | ||
| i * 2; | ||
| } while (i < n); |
There was a problem hiding this comment.
Not quite right. Please review the stopping condition and also the type of the variable capture
| // i++; | ||
| // } | ||
| for (let i = 0; i < 29; i++) { | ||
| console.log(String.fromCharCode(94 + i)); |
| do { | ||
| i += generateRandomNumber(); | ||
| } while (i < 50); | ||
| return i; |
| // TODO | ||
| const total = 0; | ||
| for (let title of allArticleTitles) { | ||
| total += title.length; |
There was a problem hiding this comment.
total was declared as a const so it's value can't be modified
| if ( | ||
| allArticleTitles[i].split(" ").length < outputOfArticle.split(" ").length | ||
| ) | ||
| outputOfArticle = allArticleTitles[i]; |
There was a problem hiding this comment.
outputOfArticle was declared as const so its value can't be modified
| } | ||
| let average = total / allArticleTitles.length; | ||
| return Math.round(average); | ||
| } |
There was a problem hiding this comment.
if you update the const sus-mentioned into let the program should be just fine. Great job
| return closingPricesForAllStocks.map((priceArr) => { | ||
| return Number((priceArr[priceArr.length - 1] - priceArr[0]).toFixed(2)); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Great job on these two functions.
There is one more left highestPriceDescriptions, please give it another try.
No description provided.