A puzzle I wrote in JavaScript. It's my first JavaScript project