9

For JavaScript snippets, the Tidy feature injects a space between the question marks that compose the nullish coalescing operator ??[1].

Example:

Prior to Tidy:

console.log(((a, b) => {
  return a ?? b;
})(null, 'b'));

The snippet below with Tidy applied injects a space into the operator which produces a syntax error when run.

console.log(((a, b) => {
  return a ? ? b;
})(null, 'b'));

1Nullish coalescing operator

1

0

You must log in to answer this question.

Browse other questions tagged .