This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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, |