mozilla

join

Here is a compatibility note with Array.join (and String.split) that when given an argument of undefined in older versions of JS, it is converted to the string 'undefined'. I'm not sure which version of JS fixed this.

eg:

 [1,2,3].join(undefined) == "1undefined2undefined3"  // not ECMA compliant
 [1,2,3].join() == "1,2,3"

Document Tags and Contributors

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