Skip to content

Instantly share code, notes, and snippets.

@nbogie
Created December 2, 2022 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nbogie/ccbc465395d2cc2bc0d60b67300c47fe to your computer and use it in GitHub Desktop.
Save nbogie/ccbc465395d2cc2bc0d60b67300c47fe to your computer and use it in GitHub Desktop.
JavaScript (not TypeScript) starter for advent of code solutions in node.js
const fs = require('fs/promises');
async function readFileAndSolveProblem() {
const inputRaw = await fs.readFile("./inputs/inputDay1A.txt", { encoding: 'utf8' })
const inputLines = inputRaw.split("\n");
console.log({ inputLines })
//TODO: solve the problem here, based on inputLines
}
readFileAndSolveProblem()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment