Tutorialsplane

ReactJs String Substr


Substr() method is basically used to extract a part of string from particular position to specified characters. Here in this article, we are going to explain to use JavaScript substr() function in reactjs. You can also use our online editor to edit and run the code online.


ReactJs String Substr Method Example

You can use string function substr simply as below-

Example:


Try it ยป

If you run the above example it will produce output something like this-

ReactJs Blog