Javascript - Write program to Change the first item of an array

Requirements

Change the first item of nameList to "SQL" by referring to the index number, and display the whole array.

Here is the array

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

Hint

Remember that array indexes start with 0.

Demo

var nameList = ["Java", "XML", "Json"];
console.log( nameList );/*  ww  w. j ava2  s. co m*/
nameList[0] = "SQL";
console.log( nameList );

Result