Comment on Bite-size coding challenge: implement if/else in JavaScript without `if` or `?:`Comments−elliotbnvl6y function ifThenElse(cond, trueFn, falseFn) { ({ true: () => trueFn(), false: () => falseFn() })[cond](); }
Comments