DEV Community

Discussion on: 10 JavaScript string methods you should know

Collapse
 
tetyemez profile image
Tugrul

Hi, thanks for the update. What about substr() function. Is it necessary when slice() exist?

Collapse
 
jenc profile image
Jen Chan

I'm not sure whether this one is deprecated or maybe I read that incorrectly...

Collapse
 
frugencefidel profile image
Frugence Fidel • Edited

substr() is not part of the core JavaScript language and may be removed in the future. Use slice() or substring() instead