Javascript - Write program to Use the length property to add a new item to an array.

Requirements

Use the length property to add a new item to nameList: Oracle.

Here is the array

var nameList = ["Java", "XML", "Json"];

Hint

Syntax hint

array[array.length] = "item";

Demo

var nameList = ["Java", "XML", "Json"];
console.log( nameList );//from   w  w w. ja  va  2 s.co  m
nameList[nameList.length] = "Oracle";
console.log( nameList );

Result