Skip to content

Instantly share code, notes, and snippets.

View jonmckee's full-sized avatar

Jon McKee jonmckee

  • The Knot WW
  • 13:47 (UTC -05:00)
View GitHub Profile
// input to the truth table
const inputValues = [true, undefined, false, null];
// expected output for each input value, respectively
const expectedValues = [true, true, false, true];
// the functions to evaluate against the above input and expectated values
const functions = [
(value) => value ?? true,
(value) => value !== false,