Contact: aviboots(AT)netvision.net.il
41,500 questions
54,078 answers
573 users
let array: number[] = [4, 9, 8, 6, 5, 7]; let index: number = 2; let newElement: number = 100; // Insert the new element at the specified index array.splice(index, 0, newElement); console.log(array); /* run: [4, 9, 100, 8, 6, 5, 7] */