Contact: aviboots(AT)netvision.net.il
43,904 questions
57,301 answers
573 users
const arr = [4, 6, 9, 2, 0, 8, 7]; const index = arr.indexOf(Math.max(...arr)); console.log(index); /* run: 2 */