*Edited
I recently stumbled upon an interesting as well as a peculiar problem with arrays in js.
As you can see above subtraction is giving me a number but addition gives me a string. I've also tried the same with multiplication and division and got number in both the cases.
Then I became more curious and tried with multi element arrays and here is the result
Now I really want to figure out how and why is this happening. Please help me on this.
Edit: I've added more examples and below are the results
As you can see above "1"+"1" is "11" which seems fine but [] returns an empty array and [1] returns 1 with key 0 and as we know arrays are also objects and that leads to confusion.