While stumbling upon JSFuck (an esoteric language that uses only 6 characters []()+! and is perfectly valid javascript code) i saw that in Javascript adding together 2 arrays [] + []
returns an empty string ''
.
Also in general adding an array converts the expression to a string
for example: false + []
gives 'false'
.
Why is this or where does this come from and where can i find a fuller documentation of these peculiar behavior than this documentation of javascript operators . Thanks a lot for the help in advance i'm very curious to expand my understanding of javascript.