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 provides an easy way to append new elements to an array without using the push() method.

const fruits = ["Banana", " Orange", " Apple"];
document.getElementById("demo").innerHTML = fruits;

function myFunction() {
  fruits[fruits.length] = " Lemon";
  document.getElementById("demo").innerHTML = fruits;
}