Solving day 3 of Advent of Code 2020 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 - One slope
6:17 Part 2 - Several slopes

Have fun!

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

I really love your channel man! You go straight to the problem and provide solutions in a clear and concise manner.

thtakapu
Автор

Apologies for commenting on a really old video, but what's the purpose of the .filter(x=> x) on line 3?

DigitalDaco
Автор

Awesome, thanks for doing these I'm learning a lot. Is there a github repo where I can look through your solutions? I like comparing them to mine to see where I can improve and having the code available outside of a video would be great, understandable if not!

matthewg
Автор

can you explain the getPosition function? what does [x % this.map[0].length]; mean? Why do you have to do %?

Dmendoza
Автор

I worked on this today as well. With the step 2 test input I also got 336 as the output, but then running the big input did not create the expected output and I’m like 🧐

Any suggestions are highly appreciated.

it_is_ni