DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 968,547 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

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 on

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.