Skip to content

Instantly share code, notes, and snippets.

View AlcaDesign's full-sized avatar
💜
Doing something

Jacob Foster AlcaDesign

💜
Doing something
View GitHub Profile
@AlcaDesign
AlcaDesign / index.js
Last active December 5, 2022 00:11 — forked from LordSmurf/index.js
AOC Day 2 Part 1
const fs = require("fs/promises");
const fileName = "input.txt";
async function readInput(fileName) {
const file = await fs.readFile(fileName, "utf-8");
return file.trim().replace(/\r/g, "").split("\n");
}
async function solveFirst(fileName) {
const inputs = await readInput(fileName);