PlayCode
Create
Log in
Sign up
Roadmap
Feedback
Bug Reports
78
Changelog
Voters
Vlad Otlogov
Powered by Canny
1
If i change length prop of array like this. i cannot expand the array in output window(console)
Vlad Otlogov
const fruits = [{a: 1}, {b: 2}, {c: 3}];
fruits.length = 5;
console.log(fruits); // [ 'Apple', 'Orange', 'Strawberry', <2 empty items> ]
November 25, 2022
Xeta
I thought <arrayName>.length was a read-only property?
·
March 13, 2023
·
Reply
Powered by Canny