indexOf

fun indexOf(element: T): Int

Returns the index of the first occurrence of the specified element in the Stack, or -1 if the specified element is not contained in the Stack.

Return

First index of the element or -1 if it is not contained in the Stack.