You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -313,7 +313,7 @@ A variable that cannot be reassigned once defined.
313
313
314
314
```js
315
315
constfive=5
316
-
constjohn= {name:'John', age:30}
316
+
constjohn=Object.freeze({name:'John', age:30})
317
317
```
318
318
319
319
Constants are [referentially transparent](#referential-transparency). That is, they can be replaced with the values that they represent without affecting the result.
0 commit comments