generated from eric/adventofcode2023
Tweak templates
This commit is contained in:
12
02/code.js
12
02/code.js
@@ -1,12 +1,12 @@
|
|||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
||||||
// const inputArray = fs.readFileSync('input.txt').toString().split("\n");
|
// const inputArray = readFileSync('input.txt').toString().split("\n");
|
||||||
|
|
||||||
// Part One
|
// Part One
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,13 +15,11 @@ console.log();
|
|||||||
|
|
||||||
// Part Two
|
// Part Two
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log();
|
console.log();
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
|
|
||||||
|
|||||||
12
03/code.js
12
03/code.js
@@ -1,12 +1,12 @@
|
|||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
||||||
// const inputArray = fs.readFileSync('input.txt').toString().split("\n");
|
// const inputArray = readFileSync('input.txt').toString().split("\n");
|
||||||
|
|
||||||
// Part One
|
// Part One
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,13 +15,11 @@ console.log();
|
|||||||
|
|
||||||
// Part Two
|
// Part Two
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log();
|
console.log();
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
const inputArray = readFileSync('sample.txt').toString().split("\n");
|
||||||
// const inputArray = fs.readFileSync('input.txt').toString().split("\n");
|
// const inputArray = readFileSync('input.txt').toString().split("\n");
|
||||||
|
|
||||||
// Part One
|
// Part One
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,13 +15,11 @@ console.log();
|
|||||||
|
|
||||||
// Part Two
|
// Part Two
|
||||||
|
|
||||||
for (i in inputArray) {
|
for (const element of inputArray) {
|
||||||
const contents = inputArray[i].split(" ");
|
const contents = element.split(" ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log();
|
console.log();
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
|
|
||||||
|
|||||||
3
package.json
Normal file
3
package.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user