3 ms·
Except ternary expressions have the huge advantage that they allow assigning to const. Eg: const var = val == 1 ? 1 : va1 == 2 ? 2 : null
by Epenthesis 8y ago
Except ternary expressions have the huge advantage that they allow assigning to const. Eg:
const var =
val == 1 ? 1 :
va1 == 2 ? 2 :
null;
- z3t4 8y agoIt's hard to argue about not using const, but can you remember any time where const actually prevented a bug !?