DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Find the index of an item in the Array
fruits.push('Mango') // ["Strawberry", "Banana", "Mango"] let pos = fruits.indexOf('Banana') // 1
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#Find
#index
#item
#Array
ADD COMMENT
Topic
COMMENT
Name
8+5 =
Submit