|
|
|
|
|
by rpastuszak
3690 days ago
|
|
However, it's worth noting that using const doesn't make variables immutable. It only protects them of being reassigned: const val = 'a';
val = 'b'; // TypeError const obj = { val: 'a' };
obj.val = 'b'; // This line will still work. obj = { val: 'b' }; // TypeError |
|