DEV Community

Discussion on: String.prototype.replace asynchronously?

Collapse
 
ladifire profile image
Ladifire

// put non matching string
substrs.push(str.slice(i, match.index));

what's "i" ??????????

Collapse
 
ycmjason profile image
YCM Jason

I have edited accordingly. Not sure why this obvious error was never spotted. Thank you!