Why does Javascript have substr() and substring()?

Viewed 49

Where did substr() and substring() originate? Why are there two methods to do the same thing with slightly different behaviours?

No programmer in their right mind would create two methods with different behaviour where the only difference in the name is the one is an abbreviated version of the other, so how did this happen?

0 Answers
Related