Should you use ternary operator?
· ☕ 2 min read
Yes.
Now, go back to work.. may be?
What the heck is this? I am sure you used something called if/else?
const sum = a + b; let result; if (sum > 100) result = "too high"; else result = "just right"; Instead of the “elaborate” syntax, we can just shorthand it.