DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js array get index
var fruits = ["Banana", "Orange", "Apple", "Mango"]; return fruits.indexOf("Apple"); // Returns 2
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#js
#array
#index
ADD COMMENT
Topic
COMMENT
Name
2+6 =
Submit