Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to use indexOf in typesript

var array = [2, 9, 9];
array.indexOf(2);     // 0
array.indexOf(7);     // -1
array.indexOf(9, 2);  // 2
array.indexOf(2, -1); // -1
array.indexOf(2, -3); // 0
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #indexOf #typesript
ADD COMMENT
Topic
Name
8+1 =