Write Your JavaScript Code Here
Run
Black
Copy Code
// slice() method is used to fetch the part of the string and returns the new string. // string.slice(start,end); let srt="Hey My name is Mayur"; let srt2=srt.slice(15); let srt3=srt.slice(15,20); console.log(srt2);
Output: