stackyFACTS
Technology

Why [] + [] becomes an empty string

HERE’S THE INTERESTING PART

Because adding nothing to nothing should obviously equal an empty string. When you force JavaScript to evaluate '[] + []', it panics, converts both empty arrays into strings, and concatenates them into a glorious void of text.

Why [] + [] becomes an empty string
STACKY / Technology
One discovery leads to another.

Keep exploring facts in this topic.

Technology →
STACKY FOR IPHONE

A bigger world.
One discovery
at a time.

Keep discovering with Stacky. Interesting facts in an app that is always within reach.

Download on the App Store
ONE MORE DISCOVERY?

Keep exploring

All in this topic →
StackyMore discoveries in the app
Download on the App Store