JSFiddle - React, Tailwind, and code Playground
JavaScript
/* 2, [2, 2, 2, 2, 2] */
// [1,3,1,4,2,3,5,4]
function test(X,A) {
return A.findIndex(time => time === X);
}
console.log(test(2, [2, 2, 2, 2, 2]))
/* 2, [2, 2, 2, 2, 2] */
// [1,3,1,4,2,3,5,4]
function test(X,A) {
return A.findIndex(time => time === X);
}
console.log(test(2, [2, 2, 2, 2, 2]))