Solving day 2 of Advent of Code 2021 in JavaScript

preview_player
Показать описание
Advent of Code is a website that releases a new programming puzzle every day between the 1st and the 25th of December.

0:00 Part 1
6:10 Part 2

Have fun!

Рекомендации по теме
Комментарии
Автор

Merci. When I solve the puzzles I sometimes spend half the time parsing the input cleanly. Watching your video afterwards helped me with some ideas for the future, so I appreciate the clean way you did I it

bikefixe
Автор

Thank you for the videos! Im picking up js after years of absence and my solutions are pretty much the same as yours algorithmically, yet it is incredibly useful to see you implementing parsing, objects and other shenangians of higher level PL me myself avoiding :D

pavelarkharov
Автор

Is there a reason why we can't do all the logic in the first part? Just add the "aim" logic to the case statement? Or does that not actually work? Really appreciate these videos by the way! Super helpful.

xShosTaK
Автор

Do you know of any good resources that I can use to learn how to import and manipulate a file with inputs. I see what you've done with "fs", I would just like to learn it so I know what and why I'm doing something. As well as if there are other ways of accomplishing the same thing. Thanks!

lvrsvid