Two possible solutions to the requirement of not being able to change a
"type" both include utilizing `const`.

1. Using `Object.freeze()`

`const x = Object.freez([1,2,3])`

2. Using `Promise.resolve()`

`const x = Promise.resolve([1,2,3])`

neither of which can be deleted or changed within the current scope.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to