JavaScriptThe `extends` keyword creates a derived class. When given a base constructor, it links the class to it through prototype chains. This lets the class inherit and override methods, and `super` lets it call the base constructor or inherited methods.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe finally keyword introduces a block executed after try and any catch, before control continues elsewhere. It supports cleanup even during a return or exception, but can itself override the earlier outcome.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe for keyword creates a loop. Its classic form combines initialization, a condition checked before each iteration, and an update performed after the loop body.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe function keyword defines a function with parameters and a body. Learn the difference between a declaration and a function expression, and how return supplies a result.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe get syntax defines a getter: a function invoked when a property is read. It lets you compute a value without calling a method with parentheses; get itself is not a reserved word.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe if statement selects a code branch based on a condition. An optional else handles a false result, while else if checks further conditions in a defined order.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe import keyword makes exports from other modules available. Learn static declarations, live bindings, and how import(...), import.meta, and ordinary function calls differ.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptlet declares a block-scoped variable that can be reassigned. Learn initialization, shadowing, and the temporal dead zone, plus the differences from var and const.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe new operator invokes a constructor with supplied arguments and returns an object. For an ordinary constructor function, it creates an object linked to the function's prototype and exposes that object inside the function as this.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScript`of` separates the loop variable from the source of values in `for...of`. It is a contextual keyword, not a reserved word: outside that role, it can be used as a variable name.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe return statement ends function execution and can send a result back to the caller. Learn about an empty return, early exits, and the newline pitfall.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScript`set` defines a setter: a function invoked when a property is assigned. It is part of accessor syntax, not a word reserved in every context.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScript`static` defines fields, methods, and accessors belonging to the class itself rather than its instances. A `static { ... }` block performs initialization when the class is created, without calling `new`.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe super keyword calls a base constructor or accesses properties through the prototype of the object where a method was defined. A super.method() call preserves the current this value.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe switch statement selects where execution begins by strictly comparing a value with case expressions. Learn how default, break, fall-through, and the shared declaration scope affect control flow.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe `this` keyword reads the current `this` binding. In an ordinary function its value depends on how the function is called, while an arrow function uses the enclosing binding. Storing a function in an object does not permanently bind it to that object.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe throw statement raises an exception and interrupts normal execution. A catch clause can receive the thrown value; no line break is allowed between throw and its expression.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe try statement defines a block whose exceptions can be handled by catch. An optional finally runs finalization code even during return or exception propagation. A catch, finally, or both is required.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe `var` keyword declares a variable whose scope is not limited by an ordinary block. A new binding usually starts with `undefined`, but a separate binding in a function body can instead start with the value of a same-named parameter. A declaration without an initializer leaves an existing binding’s value unchanged. An initializer assigns a value only when execution reaches the declaration.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe while statement repeats its body while its condition converts to true. It checks the condition before every iteration, so the body might never run.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe with statement temporarily includes an object in name lookup. It is forbidden in strict mode; use explicit property access in new code.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe `yield` expression suspends a generator and exposes a value to its consumer. A subsequent `next(value)` resumes execution and supplies a value to the suspended expression; `yield*` delegates iteration.
Intermediate · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptNumber(value) converts a value to a primitive number. Learn the difference between conversion and a new Number(value) wrapper object, and how Number.prototype.toString converts a number to text.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API supportJavaScriptThe += operator performs numeric addition or string concatenation, then attempts to write the result to the assignment target, which it evaluates only once. If the write does not throw, the expression yields the computed result even if the write is ignored.
Basic · ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support