DEV Community

Discussion on: Custom endsWith and startsWith Functions

 
pauljlucas profile image
Paul J. Lucas

You are correct: s0 is not needed. (It was left over from an earlier version.) You've also found a bug. (Even "simple" code like this can be tricky!) I've edited the code with a corrected version.

Thread Thread
 
rivea0 profile image
Eda

Thank you, again, for your help. I updated the article with the correct versions.