Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / JavaScript

Knowledge base — JavaScript

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 1003

JavaScript

Number.parseInt: parsing an integer prefix

Number.parseInt converts its argument to text and returns the integer from the longest valid prefix in the selected radix, or NaN.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Number.POSITIVE_INFINITY: positive infinity

Number.POSITIVE_INFINITY is the Number value +∞, equal to global Infinity and greater than every finite number.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Object.assign: copy own values

Object.assign copies enumerable own property values from sources into one target object.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Object.entries: own key–value pairs

Object.entries returns a new array of pairs for enumerable own properties whose keys are strings.

Intermediate · ECMAScript 2017 onward; example target: Node.js 24.22.2
JavaScript

Object.freeze: top-level non-extension and non-writability

Object.freeze prevents extension and reconfiguration of an object’s own properties and makes its own data properties non-writable.

Intermediate · ECMAScript 5 onward; primitive-return behavior since ECMAScript 2015; example target: Node.js 24.22.2
JavaScript

Object.fromEntries — an object from key–value pairs

Object.fromEntries creates a new object from an iterable collection of key–value entries. It supports string and symbol keys; repeated keys keep the last value. Use it to transform entries or convert a Map into an object.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.getOwnPropertyDescriptor — inspect an own property

Object.getOwnPropertyDescriptor returns a description of an object's own property: its value or accessors and its attribute flags. It skips the prototype chain and returns undefined when the object has no such own property.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.getOwnPropertyDescriptors — descriptors of own properties

For an ordinary object, Object.getOwnPropertyDescriptors returns descriptors for all its own properties, including non-enumerable and Symbol-keyed properties. Use it to inspect attributes or copy properties without turning accessors into values.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.getOwnPropertyNames — own property names

Object.getOwnPropertyNames(obj) returns a new array of string keys. For ordinary objects, these are the keys of all own properties with string keys, including non-enumerable ones. Symbol keys are excluded, and a Proxy's ownKeys trap can affect the list.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.getOwnPropertySymbols — own symbol keys

Object.getOwnPropertySymbols(obj) returns an array of Symbol keys. For ordinary objects, these are the keys of own properties, including non-enumerable ones. The method excludes string keys and does not traverse the prototype chain.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.getPrototypeOf: the immediate prototype of a value

Object.getPrototypeOf returns an object’s current immediate prototype, or null for an object with no prototype.

Intermediate · ECMAScript 5 onward; primitive coercion since ECMAScript 2015; example target: Node.js 24.22.2
JavaScript

Object.hasOwn: test direct property ownership

Object.hasOwn returns true when a key is an object’s own property, regardless of that property’s value or enumerability.

Basic · ECMAScript 2022 onward; example target: Node.js 24.22.2
JavaScript

Object.is: SameValue comparison

Object.is compares two values without coercion, treating NaN as equal to itself and distinguishing +0 from -0.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Object.isFrozen — checking whether an object is frozen

Object.isFrozen(value) checks whether an object is non-extensible, its own properties are non-configurable, and its data properties are also non-writable. It neither freezes the object nor recursively checks nested objects.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.isSealed — checking whether an object is sealed

Object.isSealed(value) checks whether an object is non-extensible and all its own properties are non-configurable. This does not imply immutable values or sealed nested objects.

Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support
JavaScript

Object.keys — own enumerable object keys

Object.keys(obj) returns a new array of an object's own enumerable string keys. It excludes inherited properties, non-enumerable properties, and Symbol keys. For ordinary objects, array-index keys appear before the remaining string keys.

Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support