From 210a6d6338e72602637c3070c7d177e8712ab664 Mon Sep 17 00:00:00 2001 From: vicentpc95 Date: Thu, 7 Dec 2023 14:38:04 +0100 Subject: [PATCH] deleted: javascript/day1.js new file: javascript/day1/day1.js renamed: javascript/day2.js -> javascript/day2/day2.js --- javascript/day1.js | 0 javascript/day1/day1.js | 19 +++++++++++++++++++ javascript/{ => day2}/day2.js | 0 3 files changed, 19 insertions(+) delete mode 100644 javascript/day1.js create mode 100644 javascript/day1/day1.js rename javascript/{ => day2}/day2.js (100%) diff --git a/javascript/day1.js b/javascript/day1.js deleted file mode 100644 index e69de29..0000000 diff --git a/javascript/day1/day1.js b/javascript/day1/day1.js new file mode 100644 index 0000000..13242bb --- /dev/null +++ b/javascript/day1/day1.js @@ -0,0 +1,19 @@ +import * as fs from "fs" +let data = fs.readFileSync("inputday1.txt").toString() + +data = data.replaceAll("one", "o1e") +data = data.replaceAll("two", "t2o") +data = data.replaceAll("three", "t3e") +data = data.replaceAll("four", "f4r") +data = data.replaceAll("five", "f5e") +data = data.replaceAll("six", "s6x") +data = data.replaceAll("seven", "s7n") +data = data.replaceAll("eight", "e8t") +data = data.replaceAll("nine", "n9e") + +let sumNum = 0 +let lines = data.split("\n") + +for (let line of lines){ + +} \ No newline at end of file diff --git a/javascript/day2.js b/javascript/day2/day2.js similarity index 100% rename from javascript/day2.js rename to javascript/day2/day2.js