DEV Community


Discussion on: TypeScript tips from Kotlin developer - const

nepeckman profile image

Yeah this is a really important distinction. const and val are read only value references, but they don't mean that the value is an immutable value. You can still change the state of the object, and you don't get any of the guarantees around thread safety mentioned in the linked article.