const user = { name: 'Alex', age: 30 }; const props = Object.getOwnPropertyNames(user); console.log(props); // [ 'name', 'age' ]