var imageList = [100,200,300,400,500];
var index = imageList.indexOf(200); // 1
You will get -1 if it cannot find a value in the array.
Practical tutorials for students and developers — learn concepts, follow examples, build projects and improve one lesson at a time.
ProgrammerCodes4u provides practical, step-by-step learning resources for web development, programming, databases, SEO, and modern developer tools.
0 Comments