Implementations to solve the problems from Advent of Code 2022, written in NodeJS
- clone this repository
- run
$ npm install
- run
$ npm run create
to create the next days folder (or$ npm run create [num]
to create a specific days folder) - add your puzzle input to
day-[num]/input.txt
and optionally test data totest-input.txt
- add your solution/code to
day-[num]/index.js
- this should export a function that accepts data (array of lines from the input file as an argument) and returns an object with propspart1
andpart2
both with corresponding answers
Assuming you've already followed the steps above, to run a days code and see the solution output...
- run
$ npm run solve [num]
where [num] is the day of which you want to see the answers