I love to ride and I have a serious addiction to the gear that I use when I ride. It’s a nasty combination that frequently results in diarrhea of the wallet. Since I’ve yet to find a cure I figured that if you’re going to do something you should go all the way. Keeping windows…
Month: January 2011
In javascript string replace doesn’t do what you think it does
When doing a string replace in javascript if you try something like this: var str = ‘test’; str.replace(‘t’, ‘s’); You’ll find that the result is: sest The replace method in javascript is not a global replace. Instead it does a single replace and moves on. If you want to do a global replace try using…