Skip to main content

One post tagged with "coding event"

View All Tags

· 3 min read
Mitchell Mudd

Thumbnail Advent of code is a coding challenge that happens every year in December. This is my first year taking part and I found it a bit clunky to copy and paste the input into a string within my JavaScript file.

The solution: use the Node File System module in synchronous mode 🙂 Using fs.readFileSync may not be best practice on normal project (you’re blocking the program from moving until the file is processed), but for advent of code it’s really nice to simply get your input.