Open this example in the interactive library
Source code
console.log(
["draft", "ready", "ready"].findIndex((status) => status === "ready"),
);
Sample output
1

Open this example in the interactive library
console.log(
["draft", "ready", "ready"].findIndex((status) => status === "ready"),
);
1