This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JavaScript Arrays

The push() Method

The push() method returns the new array length:

const fruits = ["Banana", " Orange", " Apple", " Mango"];

document.getElementById("demo1").innerHTML = fruits.push(" Kiwi");
document.getElementById("demo2").innerHTML = fruits;