modified: javascript/day1/day1.js

main
vicentpc95 2023-12-07 14:44:37 +01:00
parent 210a6d6338
commit 3d248900a3
1 changed files with 9 additions and 1 deletions

View File

@ -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
}
}