mirror of
https://github.com/tomru/adventofcode.git
synced 2026-03-03 06:27:19 +01:00
remove js of day1
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import * as readline from 'node:readline';
|
||||
import * as fs from 'node:fs';
|
||||
|
||||
|
||||
const data = [];
|
||||
const rl = readline.createInterface({
|
||||
input: fs.createReadStream('./input')
|
||||
});
|
||||
|
||||
for await (const line of rl) {
|
||||
data.push(parseInt(line, 10));
|
||||
}
|
||||
|
||||
|
||||
let last = null;
|
||||
let part1 = 0;
|
||||
|
||||
for (const v in data) {
|
||||
if (last !== null && v > last) counter++;
|
||||
last = v;
|
||||
}
|
||||
|
||||
console.log('part1', part1);
|
||||
|
||||
Reference in New Issue
Block a user