DEV Community

Discussion on: Shorthand Javascript Techniques

Collapse
 
jaca22 profile image
Jacek Dunikowski • Edited

Ternary Operators:

// SHORTHAND
let number = x > 9 ? true : false;

Even more shorthand:

// SHORTHAND
let number = x > 9;
Collapse
 
egaprsty profile image
Ega Prasetya

Ah, this is also very cool bro. Nice comment!