It's all about optimization

3.1.5 Use ?: conditional syntax

One common task in Javascript is a simple one-line if-else condition. The language has a shortcut for exactly such a situation.

[condition statement]?[value if condition is true]:[value if condition is false]

Example One

the if-else code uses more characters than the ?: shortcut syntax

BEFORE

Using the ?: conditional syntax, you gain Negabytes:

AFTER

either of these would be an improvement:

Negabytes gained in this example: 18