Skip to content

Sonnenhut/aoc2018

Repository files navigation

AoC attempt in Javascript

Hosted via github pages: HERE (Only tested in Chrome 70)

Uses a bunch of interesting stuff:

built with: vanilla-js

My thoughts on JavaScript / what did I learn:

  • using the correct datastructure can make a huge difference (i.e Marbles/Recipe from Day09/Day14 or using a Map rather than an array)
  • lacking proper equality check (i.e. Java .equals() check in a Set - how does that properly work out with JS objects)
  • reduce, filter, split, map are very nice "out of the box" to use
  • A proper unit-testing suite that integrates into the IDE is really worth it
  • Infinite loops will hang the browser, cumbersome to debug stuff in the browser