Object.freeze() seems like a transitional convenience method to move towards using const in ES6.

Are there cases where both take their place in the code or is there a preferred way to work with immutable data?

Should I use Object.freeze() until the moment all browsers I work with support const then switch to using const instead?

5 Answers
5

Leave a Reply

Your email address will not be published. Required fields are marked *