This are my solutions for Advent of Code, an annual coding challenge that takes place from December 1st throught the 25th. Each day at 11:00 PM (CST), a new puzzle is released. The fastest finishers rank highly on both public and private leaderboards, but I'm usually asleep when it opens, so I'm just doing it for fun.
I write these in the Chrome dev console and run them on the page that has the input.
document.body.innerText.trim().split('\n')
is how I read the input lines from the page.
The final line is printed to the console automatically.