arothuis / aoc2020

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code 2020

Coverage Status Maintainability Rating Lines of Code

See: https://adventofcode.com/2020

Purpose

  1. Finish the daily exercises in JavaScript
  2. Apply a declarative style as much as possible (escape hatches allowed)
  3. Decompose into small, testable functions
  4. Extensively test the implementation, preferably using Test-Driven Development (red, green, refactor)

Declarative JavaScript

  • Prefer functions and expressions over statements and statefulness
  • Fall back to a more imperative style if we run into JavaScript's limitations (recursion depth, etc.) or declarativity is too inconvenient for current or future puzzles
  • Prefer const over let (no re-assignability)
  • Although more declarative, the use of the comma operator is discouraged as the resulting variable scoping is problematic

About


Languages

Language:JavaScript 100.0%