I created the variable p with a prototype array
const p = Object.create([])
console.log(p)
I have got the next result in Firefox Object { }, and chrome Array {}. When I use array methods they work as they should
p.push(1)
console.dir(p) //Object { 0: 1, length: 1 } OK
But when I use the assignment operator, I get the next result
p[1] = 2
console.dir(p) // Object { 0: 1, 1: 2, length: 1 } length !!!
Object.createreturns anObject. It will only look like an Array though, as you've passed itsprototypeto it - it'll have instance methods like any Array instance. developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…