It seems a const variable declared in the Console is just a "var" and can change value.
> zzz // ensure it doesn't exist
ReferenceError: Can't find variable: zzz
> const zzz = 10;
> zzz = 5; // should do nothing
I would have expected the result to have been 10, since the constant shouldn't change.
Maybe this is actually a problem with eval():
Expected Behavior without eval:
Bad Behavior with eval:
How should this bug be reclassified?
Yeah this is a known bug with eval
We should resolved this by implementing ES Harmony block scoped const.
*** This bug has been marked as a duplicate of bug 31813 ***