London 9 - Lovelace - Howard Sun - JavaScript-Core1 - Coursework- Week3 - #204
London 9 - Lovelace - Howard Sun - JavaScript-Core1 - Coursework- Week3#204howard-ss wants to merge 5 commits into
Conversation
update all exercises and 2 mandatories
update mandatory exercises
update 3-extra
update with review
| // TODO | ||
| let i=0; | ||
| while(i<birthdays.length){ | ||
| // //using includes()methods |
There was a problem hiding this comment.
Please remove the dead code(code is not being used). You are not applying code beatification(prettier or liniting), clean code improves the readability
There was a problem hiding this comment.
How would you fix the problem next time?
For now please refer following guide regarding linting,
There was a problem hiding this comment.
Please remove the dead code(code is not being used). You are not applying code beatification(prettier or liniting), clean code improves the readability
Thanks for your good comments and I'll follow your comments in the future.
Because it's an exercise, I tried different solutions and commented optional solutions in the codes.
| currEvenNumber += 2; | ||
| } | ||
| // required sum | ||
| return sum; |
There was a problem hiding this comment.
The code is correct. Good job:)
| // i++; | ||
| //} | ||
|
|
||
| for (let i=0; i< 26; i++){ |
| // TODO | ||
|
|
||
| //1.filter()method | ||
| return allArticleTitles.filter(letters => letters.length<=65); |
| wordNums.push(allArticleTitles[i].split(' ').length) | ||
| } | ||
| //return the array with lowest number using indexOf()method: | ||
| return allArticleTitles[wordNums.indexOf(Math.min(...wordNums))] |
| // TODO | ||
| //1. using 'regex': | ||
| let NumberArray = []; | ||
| const regex = /[0-9]/g; |
There was a problem hiding this comment.
This is a good implementation. Think if you could do this simpler way just using for loop and if else.
There was a problem hiding this comment.
Yes, I had optional solution with for of loop + if condition syntax btw line 91 and 110 & commented it
rami-data-infra
left a comment
There was a problem hiding this comment.
It is very good work. I have added a few observations; please keep those in my mind for the upcoming exercises. You have understood problems thoroughly
| for (let i=0; i< closingPricesForAllStocks.length; i++){ | ||
|
|
||
| let gap5and1=(closingPricesForAllStocks[i][4]-closingPricesForAllStocks[i][0]) | ||
| priceChangeArr.push(Number(gap5and1.toFixed(2))) |
There was a problem hiding this comment.
Please think if you would really need to use Number method here
There was a problem hiding this comment.
Yes, it's unnecessary .
I had deleted it .
updated after code review by ramikowaluru
No description provided.