CodeFights JavaScript ES6 Arcade Solutions #4: adjacentElementsProduct



🎓 This is part 4 of a series where I show you how to come up with the solutions to CodeFight’s arcade challenges. If you would like to join CodeFights then follow this link:

⏭ Video:

⏮ Video:

In this video we solve the adjacentElementsProduct challenge in the Intro Arcade section (challenge #4). We do this but looping through all the elements in the array and finding the products of the adjacent elements. Every time a product is higher than our current largest product, that becomes the new highest product. In the end we return the highest product.

🔴🎤

🌍

💰

👍 Like 📢 Subscribe 🔔 Hit The Bell for more content!

Nguồn:https://cinausp.org/

Xem Thêm Bài Viết Khác:https://cinausp.org/cong-nghe

Leave a Reply

Your email address will not be published. Required fields are marked *