The push() method of an array adds the specified element(s) to the end of an array.
const pets = ['cat', 'dog', 'bird'];
pets.push('fish');
console.log(pets);
// ['cat', 'dog', 'bird', 'fish'];
The push() method of an array adds the specified element(s) to the end of an array.
const pets = ['cat', 'dog', 'bird'];
pets.push('fish');
console.log(pets);
// ['cat', 'dog', 'bird', 'fish'];