Class instances are also objects. An array literal is just an instance of the Array global constructor. Side note: overwriting the globalThis.Array/Object class can be (ab)used to steal data for example from JSONp responses.
If you want to know the actual type of the object, have a look at Object.prototype.toString.call(arr), which should result in [object Array].
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Class instances are also objects. An array literal is just an instance of the Array global constructor. Side note: overwriting the globalThis.Array/Object class can be (ab)used to steal data for example from JSONp responses.
If you want to know the actual type of the object, have a look at
Object.prototype.toString.call(arr)
, which should result in[object Array]
.