const arr = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'];

console.log('Before');
console.log(arr);

console.log(`\n----------------------------------------------\n`);

splice3 = arr.splice(2, 3, 1, 2, 3);

console.log(`returns element: ${splice3}`);
console.log('\nAfter');
console.log(arr);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://codepen.io/nullobject/pen/cngzI.js