This content was proof-read by Grammarly. You can Try Grammary for FREE
When using the indexOf method , if the value is found, it returns the index representing the array element. If the value is not found, then the value –1 is returned.
Are you a .NET Developer planning to integrate GraphQL for .NET in your Application? Check out this book
Below is a sample code snippet demonstrating the search of an element in a array using indexOf method.