Skip to content

Instantly share code, notes, and snippets.

@DrNotThatEvil
Created December 6, 2019 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrNotThatEvil/c31b15a023954fd323dd05ca76b75f21 to your computer and use it in GitHub Desktop.
Save DrNotThatEvil/c31b15a023954fd323dd05ca76b75f21 to your computer and use it in GitHub Desktop.
Advent of code - 1
(((document.getElementsByTagName("pre")[0]).textContent.split("\n")).map(x => (Math.floor((parseInt(x)/3))-2))).reduce((a,c) => {return (Number.isNaN(c) ? a : a+c);});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment