Answers for "New element can also be added to an array using the length property:"

0

New element can also be added to an array using the length property:

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

fruits[fruits.length] = "Lemon";    // adds a new element (Lemon) to fruits
Posted by: Guest on April-24-2021

Code answers related to "New element can also be added to an array using the length property:"

Browse Popular Code Answers by Language