📅  最后修改于: 2022-03-11 15:01:24.256000             🧑  作者: Mango
Copy
1const object1 = {
2 a: 'somestring',
3 b: 42,
4 c: false
5};
6
7for(let key of Object.keys(object1)){
8 console.log(key);
9}
10// expected output:
11// > "a"
12// > "b"
13// > "c"