Closed Bug 1089444 Opened 10 years ago Closed 10 years ago

Array.push should fail on a constant

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ntim, Unassigned)

Details

Example const array = [1,2]; array.push(3); console.log(array) // [1,2,3]
Blocks: es6:let
That's not how const works. const says that the name is being bound to one single value, forever and ever amen. It doesn't say that the *thing* pointed to is constant.
No longer blocks: es6:let
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.