Can you reassign a const variable in JavaScript?
In C++, we can cast variables to and from const. Is there something similar in JavaScript?
My question is
const a = 1;
unconst(a);
a = "xyz";
a === "xyz" // true
I'm not referring to object property reassignments or array push/pop;
or
let a = 1;
const(a);
a = "xyz"; // error
a === 1 // true
a is now const, like Object.freeze for objects