|
@@ -1,15 +1,16 @@
|
|
|
const fs = require('fs')
|
|
|
|
|
|
-let data = JSON.parse(fs.readFileSync('./data.json'))
|
|
|
+let data = JSON.parse(fs.readFileSync('./Day 1/data.json'))
|
|
|
|
|
|
data.forEach(element => {
|
|
|
data.forEach(element2 => {
|
|
|
data.forEach(element3 => {
|
|
|
if (element + element2 + element3 == 2020) {
|
|
|
- console.log('found')
|
|
|
let answer = element * element2 * element3
|
|
|
+ console.log(element + " " + element2 + " " + element3)
|
|
|
console.log(answer)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
+
|