Advertisement — Top

Responsive Advertisement

what index values are allowed for array in javascript

 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.

Post a Comment

0 Comments