matthewdavi - Overview

View matthewdavi's full-sized avatar

Matthew Davis matthewdavi

I'm writing a lot of JavaScript (and TypeScript!). But all of the public JavaScript I have on here is old and embarrassing. I'm certainly much better now

Block or report matthewdavi

Pinned Loading

  1. connect four stuff, oops

    TypeScript

  2. 1

    /* I've been thinking about default params a bit. And how you can use earlier params as values in the default params. 

    2

    It's a nice way to write functions without introducing any variable declaration statements in the body */ 

    4

    const greaterThan = num1 => num2 => num1 < num2;

    5

    const not = fn => (...args) => !fn(...args);
  3. 1

    /* I haven't seen anyone write about this, but I thought about it this morning in the shower and it works, why wouldn't it? 

    2

    JSX is just sugar for function calls (React.createElement). */