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

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

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

splice1 = arr.splice(2, 4);

console.log(`returns element: ${splice1}`);
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