I want to prevent editing of a particular key's value of an object. means it should be initialized only once. suppose there is a constructor function Student(fname,lname,id).
function Student(fname,lname,id){
this.fname = fname;
this.lanme= lname;
this.id= id;
}
var st1 = new Student ('surya','pratap',1)
I want to prevent the modification of Id only for st1.fname and lname can be modified.