1myObject = {
2 "key": "value",
3 "key2":"value2"
4}
5Object.keys(myObject);
6//console.log(Object.keys(myObject)) = ["key", "key2"]
1const object1 = {
2 a: 'somestring',
3 b: 42,
4 c: false
5};
6
7console.log(Object.keys(object1));
8// expected output: Array ["a", "b", "c"]
1const object1 = {
2 a: 'somestring',
3 b: 42,
4 c: false
5};
6
7console.log(Object.keys(object1)); // expected output: Array ["a", "b", "c"]
8
9// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys