Skip to content

getIndexById

returns the index of the item with the specified ID

function getIndexById(
// the item ID
id: number|string
): void

If the ID is not found, the method returns -1