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 length Property

The length property provides an easy way to append new elements to an array without using the push() method:

const fruits = ["Banana", " Orange", " Apple", " Mango"];
document.getElementById("demo1").innerHTML = fruits;
fruits[fruits.length] = " Kiwi";
document.getElementById("demo2").innerHTML = fruits;