Javascript - Write program to Use the push() method to add a new item to an array.

Requirements

Use the push() method to add a new item to fruits: Kiwi.

Here is the array

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

Demo

var fruits = ["Banana", "Orange", "Apple"];
console.log( fruits );/* ww w . ja  va 2  s . c  o  m*/
fruits.push("Kiwi");
console.log( fruits );

Result