Strange situation. Consider an example. Suppose we calculate an even or odd number in front of us:
var time = new Date().getTime(); if ( time % 2 ) console.log('Нечётное') else console.log('Чётное')
Works. Yes ... But brevity is the sister of talent:
( time % 2 ) ? console.log('Нечётное покороче') : console.log('Чётное покороче')
In theory, both records are similar, but as a result of a short record we catch "Egorku":
Uncaught TypeError: undefined is not a function
WTF?