DEV Community

loading...

Discussion on: Shorthand Javascript Techniques

Collapse
jaca22 profile image
Jacek Dunikowski

Ternary Operators:

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

Even more shorthand:

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

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