var object = {}; Object.defineProperties(object, { foo: { enumerable: false, value: 1 } }); console.log('Object.getOwnPropertyNames', Object.getOwnPropertyNames(object)); console.log('Object.getOwnPropertyNames', Object.keys(object));