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