By StevenLevithan
via blog.stevenlevithan.com
Submitted: Apr 14 2008 / 09:43
I'll describe the problem in the context of iterating over matches in a string using the RegExp.prototype.exec method and a while loop. That's where I've most frequently encountered this lastIndex bug, and I think it will help explain why the issue exists in the first place.
SaveShareSend
Tags: how-to, javascript
Add your comment