Different browser manufacturers implement their own versions of JavaScript (or ECMAScript or JScript or whatever you wish to call it). They also implement different features at different times.
So this might have been a way of testing for a certain browser version, or it might have been because the user didn't want to assume the replace method existed, or for any number of reasons.
Without contacting the original author of that code, we can only speculate as to why they coded it.
Dan
[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.