Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

substr()

//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:
ADD COMMENT
Topic
Name
4+7 =