-
Notifications
You must be signed in to change notification settings - Fork 0
/
object.js
32 lines (32 loc) · 882 Bytes
/
object.js
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
// var obj = {
// "name": "test"
// };
// console.log(Object.getOwnPropertyDescriptor(obj, 'name'))
// Object.defineProperty(obj,"name",{
// writable:false,
// value:"can't write"
// });
// console.log(Object.getOwnPropertyDescriptor(obj, 'name'))
// console.log("1:",obj.name);
// obj.name = "test";
// console.log("2:",obj.name);
// Object.defineProperty(obj,"name",{
// configurable:false,
// value:"can't delete"
// });
// console.log(Object.getOwnPropertyDescriptor(obj, 'name'))
// delete obj.name;
// console.log("3:",obj.name);
console.log(1+true)
console.log("1"+0.1);
let str = "hello";
let str_num = "2";
let num = 40;
let bol = true;
console.log(str+num);
console.log(str_num+num);
console.log(str_num+bol);
console.log(str+bol);
console.log(num+bol);
console.log(str>bol,str_num>bol);
console.log(str>num,str_num>num);