What is your favorite JavaScript object?

Mine would have to be the array! IntersectionObserver might be a distant…VERY distant second :stuck_out_tongue:

I like Function. But, hey, Arrays are cool too.


Well maybe, or maybe not?

elm user?

1 Like

Maybe Just Maybe (oh) Nothing ? :yum:

1 Like

but is it always an object?

Not always, but it is most of the time, so that should count. :+1:

Date, because who doesn’t like an object that can get you dates :run_in_fear:

RegExp is pretty neat too.


I don’t have a favorite, but I like how random things can be combined:

Infinity.constructor(NaN) // NaN
NaN.constructor(Infinity) // Infinity

throw Symbol`hey`

(_ => Object)`${ void 0 }`

Hmm, looks like all these examples use functions… just sayin!

@senocular, I appreciate how you first “liked” my Boolean answer then “un-liked” it, very Boolean-esque. :nerd_face:

It’s been a while… are JS functions not objects?

Maybe I did, maybe I didn’t :ninja:


They are. I said I liked functions. Then you come and show a bunch of functions, so I feel validated :wink:

1 Like