Erik Reppen wrote:
myPocketD( function(){ //altered proto methods swapped before this func arg is fired and then swapped back after it closes [0,1].join(''); //alerts 'Somebody did something awful to the Array join method!' //you could pretty much write your entire app in spaces like this and then plug in third party stuff without fear of blowing anything up.
});

Is join('') awful? It has its uses, along with an identity when you know a string has no non-BMP chars encoded as pairs):

  s.split('').join('') === s

Now and then, split('') followed by array processing followed by join('') works best.

Also, building an array and then doing a.join('') to get a string used to be a perf win over +-based string concatenation in IE, at least.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to