mozilla

Compare Revisions

Array.prototype.indexOf()

Change Revisions

Revision 371205:

Revision 371205 by tw2113 on

Revision 371207:

Revision 371207 by tw2113 on

Title:
Array indexOf method
Array indexOf method
Slug:
JavaScript/Reference/Global_Objects/Array/indexOf
JavaScript/Reference/Global_Objects/Array/indexOf
Tags:
Array, correction, Array methods,
Array, correction, Array methods,
Content:

Revision 371205
Revision 371207
t122var index = array.indexOf(2);t122var index = array.indexOf(2); // index is assigned 0
123// index is 0123index = array.indexOf(7); // index is assigned -1
124index = array.indexOf(7);
125// index is -1

Back to History