I am puzzled by this snippet:
var n1 = 5-"4";
var n2 = 5+"4";
alert(n1);
alert(n2);
I understand that n1 is 1. That is because a minus operator would convert the string "4" into number and subtract it from 5. But why do we get 54 in case of + operator?
Can someone explain this difference between + and = operators to me?