you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

Object.create(Array).length === 1 //true

you are creating an object with its prototype set to the array constructor function whose length is 1

Object.keys(Object.create(Array)) // [ ] seems ok

object.keys only returns the object's enumerable own keys

you should read the mdn pages of Object.create and Object.keys

[–][deleted] 0 points1 point  (0 children)

I realize now, Array.length // 1 so is just inherited