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