This is one of those annoying things I have to relearn every time I come back to writing something in JS.
$ [] instanceof Array true $ '' instanceof String false $ typeof [] 'object' $ typeof '' 'string' $ typeof new String('') 'object' $ wow right of course
That, and this
.
Top comments (0)