nullish_coalesing_operator.js 174 B

12345678910111213
  1. obj.foo ?? "default";
  2. const x = (foo, bar = foo ?? bar) => {};
  3. foo ? bar ?? foo : baz;
  4. foo ?? (bar ?? baz);
  5. foo ?? baz || baz;
  6. (foo && baz) ?? baz;
  7. foo && (baz ?? baz);