programming-examples/js/Object/Delete a property from an object and print before or after deleting.js

7 lines
192 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
var student = {
name : "David Rayy",
sclass : "VI",
rollno : 12 };
console.log(student);
delete student.rollno;
console.log(student);