ee.List.indexOf
Returns the position of the first occurrence of element in list, or -1 if list does not contain element.
Usage | Returns |
---|
List.indexOf(element) | Integer |
Argument | Type | Details |
---|
this: list | List | |
element | Object | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-05 UTC.
[null,null,["Last updated 2024-06-05 UTC."],[[["This method finds the first occurrence of a specified element within a list."],["It returns the position (index) of the element if found, or -1 if the element is not present in the list."],["It's used with the syntax `List.indexOf(element)`, where 'list' is the target list and 'element' is the item to search for."]]],[]]