Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

substr String method in javascript

//substr() is similar to slice().
//The difference is that the second parameter specifies the length of the extracted part

let str = "Apple, Banana, Kiwi";
let part = str.substr(7, 6);

// >> Banana

//if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by www.tutorialstonight.com #
 
PREVIOUS NEXT
Tagged: #substr #String #method #javascript
ADD COMMENT
Topic
Name
5+7 =