DEV Community

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

Collapse
 
kannndev profile image
Kannan

I think we can achieve the same in javacript using
const todo = Object.freeze({title: 'js is awesome'})

Collapse
 
stereobooster profile image
stereobooster • Edited

Keep in mind it is not recursive. See github.com/substack/deep-freeze

Collapse
 
avikki profile image
AviKKi

I think this method is much more standard and it's used much more widely. freeze and seal are a must know.