Contact: aviboots(AT)netvision.net.il
40,769 questions
53,151 answers
573 users
const array = ['c++', 'Node.js', 'c', 'java 9', 'php', 'node.js']; const substring = 'node'; const index = array.findIndex(element => { if (element.includes(substring)) { return true; } }); console.log(index); /* run: 5 */