Solving day 1 of Advent of Code 2022 in JavaScript

preview_player
Показать описание
Sorry for the potato quality, it's still watchable so I've uploaded the video anyway. I've also updated my recording settings to improve the video quality for the next days!

Advent of Code is a website that releases a new programming puzzle every day between the 1st and the 25th of December.

0:00 Welcome to AOC 2022
1:34 Part 1
5:48 Part 2

Have fun!

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

Wonderful video, at first I got upset and then sad because I could not solve it on my own, but the way you structured the code and explained taught me a lot of things! Thanks a lot

MateusGamer
Автор

Nice approach man! I didn't know how to parse the input as I'd never used node:fs before. You opened the door, much appreciated!

Bloodslunt
Автор

I am starting my journey in javascript (went through a quick course a few weeks ago) and I am VERY thankful to have found you! Since I don't really know how to code, Advent of Code seemed like a good idea to learn. Off to a good start thanks to YOU! 💜

ellakai
Автор

Thank you so much for this - I'm very new to JS and had no idea - still not sure where I was going wrong, but you taught me a TON in this video. Looking forward to learning more with Day 2. (so very much behind).

RichardSouth
Автор

Great video thank you very much. Glad that I found your comment on reddit and looking forward to the next AOC youtube walktrough videos!

danielzitar
Автор

I know I am a bit late to the party but I love the video and explanations, thank you for the help!

brandonwilson
Автор

It's that time of the year again. Nice clean solution.

mpl
Автор

This is just what I've been looking for. Thanks a lot!

Kainpets
Автор

I did JavaScript for around a year about a year ago, but I haven't touched it in a while and forget 99%, so I thought advent of code would be a good way back into it. This video helped me a lot to get back into how to write JS again.

mattg
Автор

really cool and well explained as well !. I'm actually learning code and videos like this are so precious. (Are you french or something ? i can ear an accent :) ) Thanks a lot and see you tomorrow ^^

benoitbonnoron
Автор

A couple questions:
1. Why am I getting the error "elf.split('\n").map(Number); /// TypeError: elf.split is not a function?
2. Why do you declare const calories twice?

Thanks, good job on your solution.

lvrsvid
Автор

The resolution seems pretty low, looking forward to the next videos.

SoreBrain
Автор

Great video, you explained your solution well. One thing I noticed about your files is that you used the .mjs file extension. Is this any different compared to just using .js?

uxoy
Автор

@Thibpat glad you back! :) Let's see how far we get this year. 🤞

timomcgeer
Автор

hello. i have a problem.
When I use .split("\n\n") my array will switch to the object data type and i can't swich them to Number. Is that normal??
can you help me.

_phamvandung
Автор

thanks so much for the video! Just one question, when I try to run the code I get a node error, that elf.split("\n") is not recognized as a function. Any ideas where the error might be? I am using the latest node version :)

camcoem
Автор

tried doing this but it returned no value

mvhmz