DEV Community

Discussion on: 9 Extremely Powerful JavaScript Hacks

Collapse
 
danoswalt profile image
Dan Oswalt • Edited

Probably not in a class or function, but it's super useful in template code or jsx when you are in need of a terse expression, such as to say 'if object exists, render object.property'... user && user.name, etc

Thread Thread
 
mburszley profile image
Maximilian Burszley

Leave terse to compilers unless it makes your expression more clear.