var index = [12, 5, 8, 130, 44].indexOf(130); console.log(index); var index = [12, 5, 8, 130, 44].indexOf(50); console.log(index);