JavaScript program for constants with array and objects

 const a=[10,20,30];

a[1]=25;

a[2]=20;

document. write(a);

document. write("<br>");

const b={

    name: "Gaurav",

    age: 18

};

b. name="divyansh";

b. age="19";

document. write(b.name);

document. write(b. age);

Output




Comments