Last active
December 3, 2018 14:19
-
-
Save Saturate/b58fc980033cf515d50f33a3b79923a5 to your computer and use it in GitHub Desktop.
Advent Of Code 2018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Load the data from the page | |
const data = document.body.innerText.split('\n'); | |
// Do the calculations! | |
let answer = data.reduce((total, feqChange) => total + Number(feqChange), 0); | |
// Tell us cool stories, bro! | |
console.log(`Answer is: ${answer}, copied to clipboard!`); | |
copy(answer); | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
// Load the data from the page | |
const data = document.body.innerText.split('\n'); | |
// Do the calculations! | |
const seen = new Set(); | |
// Loopi-deloop-thingy! | |
// Tell us cool stories, bro! | |
console.log(`Answer is: ${answer}, copied to clipboard!`); | |
copy(answer); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment