That’s false, because === compares references, not contents. You’re comparing:

a → an existing (now empty) array object

[] → a brand new empty array object

Same contents, different identity.

Reply to this note

Please Login to reply.

Discussion

you're right that it doesn't compare by value, but I was just trying to communicate that the array is indeed empty