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

Modules and responsibility boundaries

ECMAScript modules separate internal declarations from explicit exports. Imports connect modules, while a barrel module collects re-exports behind one entry point.

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

Navigation and routing

Navigation means moving to another location or view, while routing maps a path to its handling logic. Neither is a separate ECMAScript syntax construct. The example demonstrates route selection only, without changing the browser address.

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

Numeric types: Number and BigInt

JavaScript has two primitive numeric types: Number for floating-point calculations and BigInt for integers without a fixed bit width. They differ in precision, division behavior, and conversion rules.

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

Object model and composition

JavaScript objects combine own properties, prototype delegation, and property descriptors. Learn how inheriting behavior differs from composition and how to control property reads, writes, and enumeration.

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

Observers and geometry: the pattern versus host APIs

The observer pattern lets code notify registered callbacks about state changes. The example shows only how to explicitly log a rectangle’s current dimensions, without subscriptions or browser measurements.

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

Performance and complexity: fixed-height list virtualization

Distinguish actual execution time from how cost grows with data size. Fixed-height list virtualization calculates the visible range and limits rendered elements, but does not automatically reduce the cost of storing or processing the entire dataset.

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

Program entry point

JavaScript does not require a main() function. The host environment initiates evaluation of a script or module, and top-level code can explicitly call a function that starts the application.

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

Progressive enhancement

Progressive enhancement means building working baseline functionality before adding optional JavaScript improvements. The user's main task should remain available when a script does not download, does not run, or lacks a required environment capability.

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

Records and aggregates

A record groups named fields describing one thing, while an aggregate combines multiple values. JavaScript can model these structures with ordinary objects and arrays, with important consequences for mutation and object identity.

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

Recursion

Recursion means a function calls itself, directly or indirectly. A base case ends the computation, while each recursive step should move the input closer to that case.

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

Array reductions and statistics

A reduction combines array elements into one result. Learn how the Array.prototype.reduce() accumulator supports counts, sums, minima, maxima, and means, including explicit handling of empty and sparse arrays.

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

Regular expressions

Regular expressions describe text patterns. A RegExp object lets you test for matches and extract parts of text; flags modify how matching works.

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

Scope and lifetime

Scope determines where a name refers to a particular binding. Lifetime concerns how long a binding or object remains needed during execution. A closure can preserve access to a local variable after its enclosing function returns.

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

Security boundaries: HTML text escaping versus sanitization

A security boundary separates untrusted data from operations that give it meaning or authority. Learn the difference between HTML text escaping and allowlist sanitization, and understand the limits of a small JavaScript escaping example.

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

Sorting and comparing array elements

Sorting orders elements according to a comparison rule. Learn the default textual order, numeric comparators, stability, and the difference between mutating sort() and copying toSorted().

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

State and transactions

State is the data describing a program's current situation. Learn how object mutation differs from replacing state, and how to group changes without assuming automatic rollback.

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

Browser storage

Browser storage consists of browser-environment mechanisms for retaining client-side data. Learn the distinction between localStorage and sessionStorage and the boundary between the ECMAScript language and Web APIs.

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

Strings: UTF-16, code points, and graphemes

A JavaScript string is an immutable sequence of UTF-16 code units. Learn how code units, code points, and graphemes differ, and why normalization matters when comparing text.

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

Structured clone algorithm and transferable ownership

structuredClone() copies supported data structures while preserving cycles and repeated references within the copy. The transfer option moves resources instead of copying them and detaches the original ArrayBuffer.

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

Testing and assertions

A test compares observed behavior with an expectation, and an assertion signals when a condition is not met. See a small unit test using a built-in Node.js module and learn why comparison rules and boundary cases matter.

Basic · Syntax snippet: Requires ECMAScript 2015 or later because it uses Object.is, which was standardized in ECMAScript 2015. Executable example: verified in Node.js 24.22.2 using the built-in node:assert/strict module. This does not establish browser API support.
JavaScript

Dates and time

A Date represents an instant as milliseconds since the start of 1970 in UTC. Distinguish an instant, a local calendar representation, and a duration to avoid time-zone-related mistakes.

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

Type conversion

Type conversion produces a value of the target type, which can be the same as the input type. Learn the difference between explicit conversion with Number(), String(), and Boolean() and implicit conversion performed by operators.

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

JavaScript type system

JavaScript is dynamically typed: types belong to values, and a variable declared with let can hold values of different types over time. Learn the eight language types, conversions, and the limitations of the typeof operator.

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

Variables: let, const, and var

A variable binds a name to a value. Learn how declarations and initialization work, how let, const, and var differ, and how scope and initialization determine when values are accessible.

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