javascript - Google Chrome cluttering Array generated from .split()
- by patrick
Given the following string:
var str = "one,two,three";
If I split the string on the commas, I normally get an array, as expected:
var arr = str.split(/\s*,\s*/);
Trouble is that in Google Chrome (for Mac), it appends extra properties to the array.
Output from Chrome's debugger:
arr: Array
0: one
1: two
2: three
constructor:…