const fruits = ['banana', 'apple', 'orange', 'kiwi'];
const filteredFruits = fruits.filter(fruit => fruit.includes('an'));
console.log(filteredFruits) // Output ['banana', 'orange']
Add a new element to the array at the end
const fruits = ['banana', 'apple', 'orange', 'kiwi'];
fruits.push('mango');
console.log(fruits) // Output ['banana', 'apple', 'orange', 'kiwi', 'mango'];