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 );//  www  .j a v a  2 s  .c  o m
nameList[0] = "SQL";
console.log( nameList );

Result