I was writing some javascript code and instead of writing $("p").append(a +", ");
i mistyped it as $("p").append(a +=", ");
.
After i ran the script the result was quite peculiar. I have created this Fiddle. Click on the button 3,4 times and the result would be something like this : 0, 0, , 0, , , 0, , , ,
.
As I am a beginner in javascript maybe i don't know some syntax which is causing this behaviour. Also i wasn't able to find any references to a similar problem anywhere. I want to understand how this is happening.