Write Your JavaScript Code Here

// indexOf(str,index)-It start searching the element from the provided index value and then returns the index position of first character of string. // String.indexOf("str",index); let srt = "We've suffered losses, but we've not lost the war." console.log(srt.indexOf("war",4));

Output: