Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/rambda.js>indexOf

Faster and smaller alternative to Ramda
Latest
function indexOf
import { indexOf } from "https://deno.land/x/rambda@9.4.1/rambda.js";

It returns the index of the first element of list equals to valueToFind.

If there is no such element, it returns -1.

Parameters

valueToFind: T
list: T[]

Returns

number

Parameters

valueToFind: T

Returns

(list: T[]) => number