javascript
Published on January 26, 2024By DeveloperBreeze
// Original array
let arr = [1, 2, 3, 4, 5];
// Display the original array
console.log('Original Array:', arr);
// Reverse the array in place
arr.reverse();
// Display the reversed array
console.log('Reversed Array:', arr);
Comments
Please log in to leave a comment.