Here is the piece of code
str = "a,b,c";
name = str.split(",");
The name variable shows up as ‘object’ type in Firefox and ‘string’ type in chrome
Why is that happening ?
Here is the jsfiddle http://jsfiddle.net/XujYT/17/
Also the name variable stores the value "a,b,c" instead of the split array in chrome
http://jsfiddle.net/XujYT/23/
Because
nameis a global variable used by chrome, and it’s not possible to override it without unexpected results. Try: