|
|
|
|
|
by sheept
7 days ago
|
|
You probably meant [object Object] :) Since arrays have their own default toString implementation (its own can of worms that is the basis for JSFuck[0]), you'd have to go out of your way with Object.prototype.toString.call to get [object Array] [0]: https://jsfuck.com/ relies on Array#toString for casting values to strings |
|
Since the "Array" is a reference to the prototype, I think it might be outdated due to changes in undefined behavior of runtimes when serializing array objects, or logging them.
I'm pretty sure that [object Array] used to be the result of logging an array at some point.
always returns the result of per spec, afaik, so for an empty array it's the empty string.