Exploiting JavaScript quirks for fun and profit

1 · Hugo Giraudel · Jan. 21, 2022, 7:45 p.m.
I have been having fun with Advent of Code recently. I only started playing in 2019 (and didn’t finish back then), so I decided to go back to previous years to solve old puzzles for fun. And while powering through year 2017, I’ve ended up using the with JavaScript statement for the very first time. Worth a few lines! The problem Day 8 of 2017 has a very straightforward problem statement. Given a set of instructions like the ones below, figure out the maximum value reached by any variable (called...