Skip to content

Commit fc7821b

Browse files
committed
Adding code for immutability
1 parent b4dd0d0 commit fc7821b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Chapter 6/Immutable.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
var consts = Object.freeze({ pi: 3.141 });
3+
consts.pi = 7;

Chapter 6/Immutable.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
var consts = Object.freeze({ pi : 3.141});
3+
consts.pi = 7;

0 commit comments

Comments
 (0)