Closed
Bug 1089444
Opened 10 years ago
Closed 10 years ago
Array.push should fail on a constant
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
INVALID
People
(Reporter: ntim, Unassigned)
Details
Example
const array = [1,2];
array.push(3);
console.log(array) // [1,2,3]
Comment 1•10 years ago
|
||
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.
You need to log in
before you can comment on or make changes to this bug.
Description
•