Ternary operator '?': Non-traditional use of '?'

It is not recommended to use the question mark operator in this way.

Let company = prompt('Which company created JavaScript?', '');

*!*
(company == 'Netscape') ?
   alert('Right!') : alert('Wrong.');
*/!*

Sometimes the question mark ? is used as a replacement for if.

Related concepts

Non-traditional use of '?'

Ternary operator '?': Non-traditional use of '?' — Structure map

Clickable & Draggable!

Ternary operator '?': Non-traditional use of '?' — Related pages: