Difference between revisions of "IndexOf"
Jump to navigation
Jump to search
(Created page with "<c>indexOf</c> returns index or key of the given value, or if not found. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning |- | ''self''...") |
|
(No difference)
|
Revision as of 15:23, 17 March 2020
indexOf
returns index or key of the given value, or if not found.
Arguments
Parameter Name | Default Value | Meaning |
---|---|---|
self | string, list, or map | object to search |
value | any | value to search for |
after | any, optional | if given, starts the search after this index |
Examples
"Hello World".indexOf("o") // returns 4
"Hello World".indexOf("o", 4) // returns 7
"Hello World".indexOf("o", 7) // returns null