const pets = ['Dog', 'Cat', 'Hamster', 'Squirrel'];
console.log('Before');
console.log(pets);
const reverse = pets.reverse();
console.log(`\nreturns element: ${reverse}`);
console.log('\nAfter');
console.log(pets);
console.log(`\n----------------------------------------------\n`);
const num = [4, 1, 63, 8, 5, 100, 9, 75];
console.log('Before');
console.log(num);
const reverse2 = num.reverse();
console.log(`\nreturns element: ${reverse2}`);
console.log('\nAfter');
console.log(num);
This Pen doesn't use any external CSS resources.