© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Fakiolas Marios
Full-stack JavaScript lover, happy husband, proud father 😉 - Head of Web & Frontend at @omilialtd
j
stuff ;)
I guessed right :) since every array is a special case of an object
[].constructor.name
that's what we would expect.
TheSheriff
Co-Founder, Founder, Entrepreneur & Problem Solver
This issue can be sooooo annoying at times.
totally ! I also hate that the caller property is not accessible in the constructor .... not even for read.
I'm disagreeing on this one - and apparently, I'm the only one who voted as an Array so far, lol.
Arrays can have objects, yes - but it's still an array - of objects
A car is a car (array) - it's not 4 seats (objects). A car can have 4 seats; but it's still a car containing seats
Obligatory W3
Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays. But, JavaScript arrays are best described as arrays. Arrays use numbers to access its "elements". In this example, person[0] returns John:
Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays.
But, JavaScript arrays are best described as arrays.
Arrays use numbers to access its "elements". In this example, person[0] returns John:
If it can be accessed via a number; it's an array. If it can be accessed by a name - it's an object.
Tommy Hodgins
CSS & Element Queries
Ahhh sneaky :D
Mario Giambanco
Director of User Experience Development
j
stuff ;)
I guessed right :) since every array is a special case of an object
[].constructor.namethat's what we would expect.