Hacker News new | ask | show | jobs
by Epenthesis 2985 days ago
Except ternary expressions have the huge advantage that they allow assigning to const. Eg:

    const var =
      val == 1 ? 1 :
      va1 == 2 ? 2 :
      null;
1 comments

It's hard to argue about not using const, but can you remember any time where const actually prevented a bug !?