-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathpi.js
More file actions
35 lines (24 loc) · 774 Bytes
/
mathpi.js
File metadata and controls
35 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const descripter = Object.getOwnPropertyDescriptor(Math, "PI");
//console.log(descripter);
// console.log(Math.PI);
// Math.PI = 5;
// console.log(Math.PI);
const chai = {
name: 'ginger chai',
price: 250,
isAvailable: true,
// error: function(){
// console.log("chai nahi bani")
// }
}
// console.log(Object.getOwnPropertyDescriptor(chai, 'name'));
Object.defineProperty(chai, 'name', {
//writeable: false,
enumerable: false,
})
console.log(Object.getOwnPropertyDescriptor(chai, 'name'));
for (let [key, value] of Object.entries(chai)) {
if (typeof value !== 'function') {
console.log(`${key} : ${value}`)
}
}