Contact: aviboots(AT)netvision.net.il
39,959 questions
51,901 answers
573 users
const arr = ['typescript', 'php', 'python', 'c', 'c#', 'c++']; const index = arr.indexOf('c'); if (index !== -1) { arr[index] = 'go'; } console.log(arr); /* run: ["typescript", "php", "python", "go", "c#", "c++"] */