A
Asen Bozhilov
^^^^Michael said:return function(){
return this.replace(reTrim,"$1");
Should be explicit cast `this' value ToString, because in ES5:
The trim function is intentionally generic; it does not require that
its this value be a String object. Therefore, it can be transferred to
other kinds of objects for use as a method.
String.prototype.trim.call([' x', 'x ']).length;