DEV Community

Discussion on: Const Is A Lie In JavaScript & Mastering Unit Testing

Collapse
 
sleeplessbyte profile image
Derk-Jan Karrenbeld

This article:

  • const doesn't mean constant value; if you think it means constant value, then you can blame const and call it a lie.

Lies in this article:

  • it's a fact that const implies constant value (narrator: it's not; but it can be very confusing)
  • your IDE can't force you to treat something as const (narrator: it can, especially when using TypeScript, or other sound type systems; eslint also has rules for this)