How to solve AdventJS 2023 Day 8 Challenge using JavaScript. Gifts