JavaScript: .trim() does not work in Safari

The reason why trim() doesn’t work in Safari is because this function was only added in JavaScript 1.8.1 for Firefox 3.5. As well as trimLeft(), and trimRight(). As you can see in the JavaScript Reference. Safari’s engine known as Apple Safari 4’s Nitro differs from Mozilla’s TraceMonkey implementation. I’m sure everybody, one day, passed through […]