modified: javascript/day1/day1.js
parent
210a6d6338
commit
3d248900a3
|
|
@ -15,5 +15,13 @@ let sumNum = 0
|
||||||
let lines = data.split("\n")
|
let lines = data.split("\n")
|
||||||
|
|
||||||
for (let line of lines){
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue