1

From:

someElement.addEventListener("mouseup", handleMouseUp, passiveSupported
                               ? { passive: true } : false);

What is the passiveSupported ? { passive: true } : false called? The question mark and colon. I understand what it is doing, I just want to know what it is called so I can Google it.

1 Answers1

0

In most languages, this is usually referred to as the ternary operator. Here's some documentation as it pertains to Javascript in particular.

Donut
  • 96,420
  • 18
  • 123
  • 140