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

typeof: checking a value category

typeof returns a string describing a JavaScript value category. It helps identify primitive types but does not distinguish every kind of object.

Basic · ECMAScript 2020+
JavaScript

Unary minus

Unary minus (`unary minus`), written as `-expression`, converts its operand to a numeric value and returns its negation. It supports both `Number` and `BigInt`; it does not assign the result back to the variable.

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

Unsigned right shift (>>>)

The >>> operator shifts a number’s 32-bit representation to the right, inserting zeros on the left. It returns a nonnegative Number, and the shift count is reduced modulo 32. It does not support BigInt.

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

Unsigned right shift assignment (>>>=)

The >>>= operator shifts a value’s 32-bit representation to the right, fills vacated bits with zeros, and stores the result in the left operand. Unlike >>=, it does not preserve the sign bit. It does not support BigInt.

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

The void operator

The unary `void` operator evaluates its operand, discards its value, and produces `undefined`. It preserves side effects and does not catch exceptions. The expression `void 0` provides the value `undefined`.

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

The arguments object

arguments exposes the arguments supplied to a function call. It has indexed properties and length but is not an array. Parameter aliasing depends on strict mode and the parameter list; arrow functions do not create their own arguments.

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

Arrow function

An arrow function is an expression that creates a function using =>. It can implicitly return an expression's result and uses this from its surrounding context rather than establishing its own this when 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

BigInt literal

A BigInt literal is an integer written with a lowercase n suffix, such as 42n. It creates a bigint value without the rounding that affects large Number values.

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

Computed property and method keys

Square brackets in a property or method definition let an expression determine its key. The key is established when the object is created; changing the variable used in that expression later does not rename the property.

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

Default parameters

A default parameter uses its initializer when an argument is omitted or explicitly passed as undefined. Values such as null, 0, false, and an empty string do not trigger the default.

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

Destructuring objects and iterables

Destructuring reads object properties or successive iterable values through a pattern. It supports declaring variables, assigning to existing variables, renaming bindings, supplying defaults, and collecting remaining values or properties.

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 function: function*

A generator function creates an iterator whose execution can pause at yield and resume through next(). It computes values on demand while preserving local state between successive steps.

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

Hexadecimal numeric literal

A hexadecimal numeric literal writes a number in base 16 using the prefix 0x or 0X. Without a suffix it creates a Number value; the n suffix indicates BigInt.

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

IIFE — immediately invoked function expression

An IIFE creates a function and calls it immediately. It runs code in its own function scope, accepts arguments, and returns a result without a separate function declaration.

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

Method definition

A method definition writes a method without the function keyword or a colon. Its this value depends on how it is called.

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 property shorthand

Object property shorthand lets you write `{ name }` instead of `{ name: name }`: the identifier's name becomes the key, and its current value becomes the property's value. The exception is `__proto__`: `{ __proto__ }` creates an own data property from the binding's value, while `{ __proto__: __proto__ }` uses object-literal prototype-setter syntax and does not create that property.

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

Regular expression literal

A regular expression literal (RegExp literal) writes a pattern directly in code as /pattern/flags. It creates a RegExp object that can be used to test text, search for matches, or replace matching text.

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

Strict mode — use strict

Strict mode changes JavaScript syntax and execution rules, exposing some errors that would otherwise be ignored. Enable it with a "use strict" directive; modules and class code are automatically strict.

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

Template literal

A template literal uses backticks (`) as delimiters. It supports embedded expressions through ${expression} and multiline text. A tagged variant passes text segments and expression values to a tag function.

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

The Null type and the null value

Null is a JavaScript primitive type with exactly one value: null. It represents the intentional absence of an object value. Check for it with === null: typeof null returns "object", even though null is not an object.

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 type — Object

Object is JavaScript’s non-primitive value type. Objects hold properties and have their own identity; assignment does not copy an object. Arrays and functions are objects too, whereas null is not an object.

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

Undefined — a type with the single value undefined

Undefined is a primitive JavaScript type with exactly one value: undefined. Learn the difference between the type name, its value, and the string "undefined", and distinguish this value from null.

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

AbortController — cancelling fetch operations

AbortController communicates a cancellation request through `signal`. `fetch` constructs a `Request` before checking the signal. If request construction fails, the promise rejects with that error (for example, a `TypeError` for an invalid URL), even if the signal is already aborted. If `fetch` detects the abort while its promise is pending, it rejects the promise with the abort reason. If the promise has already fulfilled with a `Response`, aborting cannot change its state but can cause a pending response-body read to fail.

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

AbortSignal — cancellation signal

AbortSignal passes a cancellation request to fetch; AbortController initiates cancellation, while the signal exposes its state.

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