I currently have an array :
let originalArr = ['apple', 'plum', 'berry'];
Is there a way to eliminate the item "plum" from this array without altering the originalArr
?
One possible solution could be:
let copyArr = [...originalArr];
originalArr = copyArr.filter(item => {
return item !== 'plum';
});