From 3d248900a33fd888877ad381f53076a82d7fa4c4 Mon Sep 17 00:00:00 2001 From: vicentpc95 Date: Thu, 7 Dec 2023 14:44:37 +0100 Subject: [PATCH] modified: javascript/day1/day1.js --- javascript/day1/day1.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/javascript/day1/day1.js b/javascript/day1/day1.js index 13242bb..b989cc3 100644 --- a/javascript/day1/day1.js +++ b/javascript/day1/day1.js @@ -15,5 +15,13 @@ let sumNum = 0 let lines = data.split("\n") for (let line of lines){ - + for (let char of line){ + isNum(char) + } +} + +function isNum(testchar){ + if (testchar == "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"){ + return testchar + } } \ No newline at end of file