Comment

Comment by pojntfx

You probably haven't written modern JS. Since ~2016 (ES6) the language is basically completely different and really concise now; consider ES5:

  function increment() {
    var out = []

    for (let i of [1,2,3,4,5]) {
      out.push(i + 1)
    }

    return out
  }
vs ES6:

  const increment = () => [1,2,3,4,5].map(i => i + 1)
etc. Most people's experience with JS/TS has simply been before ES6 (which had massive problems, like `var` and `this` scoping etc.), it's really nice nowadays.
parent pojntfx 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton