28 lines
396 B
JavaScript
28 lines
396 B
JavaScript
const fs = require('fs');
|
|
|
|
const inputArray = fs.readFileSync('sample.txt').toString().split("\n");
|
|
// const inputArray = fs.readFileSync('input.txt').toString().split("\n");
|
|
|
|
// Part One
|
|
|
|
for (i in inputArray) {
|
|
const contents = inputArray[i].split(" ");
|
|
|
|
}
|
|
|
|
console.log();
|
|
|
|
|
|
// Part Two
|
|
|
|
for (i in inputArray) {
|
|
const contents = inputArray[i].split(" ");
|
|
|
|
}
|
|
|
|
|
|
console.log();
|
|
|
|
// functions
|
|
|