https://docs.vultr.com/javascr....ipt/standard-library



In JavaScript, the indexOf() method is used to find the first occurrence of a specified element in an array. It returns the index of the first occurrence of the element, or -1 if the element is not found.

Syntax:
javascript
Copy
array.indexOf(element, start)
element: The item to search for in the array.
start (optional): The position in the array to start the search. The default is 0.

JavaScript Array indexOf() - Locate Element Index | Vultr Docs
Favicon 
docs.vultr.com

JavaScript Array indexOf() - Locate Element Index | Vultr Docs