5
Answers

How to make json object ready only

Photo of Anil Kumar Murmu

Anil Kumar Murmu

9y
1.2k
1

Say I have a JSON object

var student = {name: "Anil", Age: 27};

student.Age = 30; // I want to restrict this code.
 
Please help me to understand, how can we make JSON object read only type. 

Answers (5)