.index(val)
Description
Parameters
Usage On Arrays
arr = ["wow","hello","world"]
// setup the array
log arr.index("hello")
// returns 2
// hello is at index 2Last updated
Index is a method that returns the index of a value in an array
Index takes the value to search for as a parameter.
arr = ["wow","hello","world"]
// setup the array
log arr.index("hello")
// returns 2
// hello is at index 2Last updated