diff --git a/JS/template/solution_a.mjs b/JS/template/solution_a.mjs index 3bcfb1c..41beb47 100644 --- a/JS/template/solution_a.mjs +++ b/JS/template/solution_a.mjs @@ -10,8 +10,12 @@ async function main(data) { } fs.readFile("input", (err, data) => { - console.time("Part 1") + console.time("Part 1"); if (err) throw err; - main(data.toString()).then(console.log).catch(console.error); - console.timeEnd("Part 1") + main(data.toString()) + .then((...args) => { + console.log(...args); + console.timeEnd("Part 1"); + }) + .catch(console.error); }); diff --git a/JS/template/solution_b.mjs b/JS/template/solution_b.mjs index 85da964..7816965 100644 --- a/JS/template/solution_b.mjs +++ b/JS/template/solution_b.mjs @@ -10,8 +10,12 @@ async function main(data) { } fs.readFile("input", (err, data) => { - console.time("Part 2") + console.time("Part 2"); if (err) throw err; - main(data.toString()).then(console.log).catch(console.error); - console.timeEnd("Part 2") + main(data.toString()) + .then((...args) => { + console.log(...args); + console.timeEnd("Part 2"); + }) + .catch(console.error); });