@Kiranchai
Posted
Hey, I liked your solution for this challenge.
I would recommend you using 'forEach' loops instead of 'for' loops in these situations. I find it easier to read and it makes the JS file less complicated. There are several examples that will make it easier for you to understand: https://www.freecodecamp.org/news/javascript-foreach-js-array-for-each-example/
Also, I've done this challenge with use of 'forEach' loop, you can check it out in my solution.
Good luck in your future projects. Keep on!
Marked as helpful
@pavan-h
Posted
@Kiranchai hello thanks for suggesting i will definitely work on it that was quite helpful