MDN’s new design is in Beta! A sneak peek:


Compatibility note: in older versions of JS, when String.split() is given an undefined first argument, it converted it to the string 'undefined', instead of defaulting to ','.

"1undefined2undefined3".split(undefined) --> ["1","2","3"]    // not ECMA compliant

I'm not sure which version of JS this changed in. See also my corresponding note in Array.join()

Document Tags and Contributors

 Contributors to this page: Dleonard
 Last updated by: Dleonard,