DEV Community

Discussion on: JS: Extract portion of a string using substr() and substring()

Collapse
 
kretaceous profile image
Abhijit Hota • Edited

The substring returned by the substring method, as you mentioned, doesn't include the character at the end position passed to it. Your examples contradict that.
Might want to change them.

Short sweet article!

Collapse
 
tkeeching profile image
tkeeching

My bad. Corrected.

Good spot, thanks!