Join MDN and developers like you at Mozilla's View Source conference, November 2-4 in Portland, Oregon. Learn more at


by 1 contributor:

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,