News for hackers. Stuff that matters.
Re:Bite-size coding challenge: implement if/else in JavaScri... by elliotbnvl on Friday January 10, 2020 @03:25PM (#22015101)

  function ifThenElse(cond, trueFn, falseFn) {
      ({ true: () => trueFn(), false: () => falseFn() })[cond]();
  }

There are no comments on this comment yet.