Merge pull request #131 from asci/patch-1

fix: const can't guarantee object immutability
This commit is contained in:
hemanth.hm 2016-12-23 10:37:37 +05:30 committed by GitHub
commit ffb13cf93f

View file

@ -313,7 +313,7 @@ A variable that cannot be reassigned once defined.
```js
const five = 5
const john = {name: 'John', age: 30}
const john = Object.freeze({name: 'John', age: 30})
```
Constants are [referentially transparent](#referential-transparency). That is, they can be replaced with the values that they represent without affecting the result.