DEV Community

Discussion on: Map, Filter, Reduce vs For Loops (syntax)

Collapse
 
callmeareks profile image
Alejandro González

Ternary operator it's still an if statement in disguise.

Collapse
 
mesteche profile image
Mesteche • Edited

Not exactly, an if statement doesn't evaluate to a value, in other words, it doesn't return anything.
The ternary evaluates to something.
medium.com/javascript-scene/nested...