DEV Community

Discussion on: Solving Puzzles With High-Performance JavaScript

Collapse
 
karataev profile image
Eugene Karataev

Thanks for the illustration how to solve problems iteratively: from the basic solution to the most performant.

Before reading this post I'd solve the "jewels and stones" problem by creating a js object and populating it with "jewels" keys. But using a Set collection with has method is more elegant and straightforward solution, thanks 😄

Collapse
 
healeycodes profile image
Andrew Healey

Glad you found it helpful! I always appreciate when articles build up to the optimal solution 👍

Sets are also very cool 😎