js Get the current value in the array index

const ARR = [. 1, 2,. 3,. 4,. 6, 22 is, 55, 33 is, 66, 44 is];
const getIndex = ((ARR, Item) => {
for (var I in ARR) {
IF (ARR [I ] == Item) {
return I;
};
};
});
getIndex (ARR,
55); ----------------
copyright: This is CSDN bloggers "Chestnut * "the original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/weixin_43830188/article/details/91578761

Guess you like

Origin www.cnblogs.com/wssdx/p/11613497.html
Recommended