Javascript String Question 5

Introduction

What is the output of the following code?


let testString = "this is a test from java2s.com";

console.log( testString.indexOf("is"));

console.log( testString.indexOf("is", 4) );  


2
5



PreviousNext

Related