//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 ( ͡~ ͜ʖ ͡°)