Write Your JavaScript Code Here

// sunstr(): this method fetch the part of the original string and return the new string from the indexing provided. It does not make any changes to the original string // String.substr(start,end) let srt="Javascript"; let srt2=srt.substr(0,4);//last index exlcuded console.log(srt2);

Output: