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

Date.prototype.getDate: local day of month

getDate returns the day of the month from 1 through 31, computed in the environment’s local time zone.

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

Date.prototype.getMonth: local month index

getMonth returns the local month as a zero-based index from 0 for January through 11 for December.

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

Date.prototype.getTime: epoch milliseconds

getTime returns a Date object’s time value as milliseconds since the Unix epoch, independent of time zone.

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

Date.prototype.getUTCHours: hour in UTC

getUTCHours returns the hour from 0 through 23 derived from a Date object’s time value in UTC.

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

Date.prototype.setTime: replace the time value

setTime replaces a Date object’s time value with epoch milliseconds, applies TimeClip, and returns the new value.

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

Date.prototype.toJSON: Date in JSON serialization

toJSON returns ISO text for a valid date, null for an invalid one, and is invoked automatically by JSON.stringify.

Intermediate · ECMAScript 5 (2009) onward; example target: Node.js 24.22.2
JavaScript

Date.prototype.toLocaleTimeString() — localized time formatting

toLocaleTimeString() returns a text representation of a Date object's time using the selected locale and options. It lets you choose the time zone, time components, and hour cycle without changing the date.

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

Date.UTC: UTC components to timestamp

Date.UTC interprets numeric components as UTC, normalizes them, and returns epoch milliseconds without creating a Date object.

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

Error: base exception object

Error creates the base error object with an optional message and cause, intended for throwing and chaining failures.

Intermediate · ECMAScript 1 onward; cause option from ECMAScript 2022; example target: Node.js 24.22.2
JavaScript

Error.message — the error message text

An Error instance's message property holds its message text without the error name. Learn how error.message differs from error.toString() and what happens when the message is omitted.

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

Error names: Error.prototype.name

An error object's name property describes its category, such as Error or TypeError. You can override it, but changing the name does not change the object's type or prototype chain.

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

Float32Array: 32-bit floating-point values

Float32Array stores Number values as 32-bit IEEE 754 numbers, using 4 bytes per element.

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

Float64Array: 64-bit floating-point values

Float64Array stores Number values in the 64-bit IEEE 754 format, using 8 bytes per element.

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

Function.length — function parameter count

A function's length property describes its parameter count according to declaration rules, not the number of arguments supplied when it is called.

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

Function.prototype.apply — call with an argument list

Function.prototype.apply calls a function with a supplied this value and arguments read from an array-like object. It lets you pass a prepared list instead of writing each argument separately.

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

Function.prototype.bind — binding this and leading arguments

Function.prototype.bind creates a new function with a stored this value and optional leading arguments. It does not invoke the original function; the result can be called later or passed as a callback.

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

Function.prototype.call — invoke a function with an explicit this

Function.prototype.call immediately invokes a function with an explicit this value and individually supplied arguments. Learn how strict mode affects this and why arrow functions and bound functions ignore the supplied receiver.

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

Function.prototype versus a function's prototype property

Functions inherit invocation methods from `Function.prototype`. With ordinary `new Ctor()`, the value of `Ctor.prototype` becomes the new instance's prototype only if it is 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

Generator.prototype.next() — resuming a generator

The `next()` method starts or resumes a synchronous generator and returns an iterator result object. Its optional argument becomes the result of a suspended plain `yield` expression; the first call's argument is ignored.

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

Int16Array: signed 16-bit integers

Int16Array stores numbers as signed 16-bit integers from -32768 through 32767, using 2 bytes per element.

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

Int32Array: signed 32-bit integers

Int32Array stores numbers as signed 32-bit integers from -2147483648 through 2147483647, using 4 bytes per element.

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

Int8Array: signed 8-bit integers

Int8Array stores numbers as signed 8-bit integers from -128 through 127, using one byte per element.

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