Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
If you want all string-keyed own properties, including non-enumerable ones, see Object.getOwnPropertyNames().
Non-object arguments are coerced to objects. undefined and null cannot be coerced to objects and throw a TypeError upfront. Only strings may have own enumerable properties, while all other primitives return an empty arra
Using Object.keys() on primitives
Non-object arguments are coerced to objects. undefined and null cannot be coerced to objects and throw a TypeError upfront. Only strings may have own enumerable properties, while all other primitives return an empty arra
Using Object.keys() on primitives
Non-object arguments are coerced to objects. undefined and null cannot be coerced to objects and throw a TypeError upfront. Only strings may have own enumerable properties, while all other primitives return an empty arra
Using Object.keys() on primitives
Non-object arguments are coerced to objects. undefined and null cannot be coerced to objects and throw a TypeError upfront. Only strings may have own enumerable properties, while all other primitives return an empty arra
Enumerability and ownership of properties
Object.prototype.propertyIsEnumerable()
This page was last modified on Jul 20, 2025 by MDN contributors.