
Conditional (ternary) operator - JavaScript | MDN - MDN Web Docs
Jul 8, 2025 · The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy …
Expressions and operators - JavaScript - MDN
Jul 8, 2025 · Expressions and operators Previous Next This chapter describes JavaScript's expressions and operators, including assignment, comparison, arithmetic, bitwise, logical, string, ternary and …
Making decisions in your code — conditionals - MDN Web Docs
Aug 18, 2025 · Ternary operator example The ternary operator is not just for setting variable values; you can also run functions, or lines of code — anything you like. The following live example shows a …
Expressions and operators - JavaScript | MDN - MDN Web Docs
May 22, 2026 · This chapter documents all the JavaScript language operators, expressions and keywords.
Nullish coalescing operator (??) - JavaScript | MDN
Aug 26, 2025 · The nullish coalescing (??) operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side …
JavaScript Guide - MDN
Nov 7, 2025 · JavaScript Guide The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look …
JavaScript reference - MDN
May 22, 2026 · JavaScript reference The JavaScript reference serves as a repository of facts about the JavaScript language. The entire language is described here in detail. As you write JavaScript code, …
Optional chaining (?.) - JavaScript | MDN - MDN Web Docs
May 22, 2026 · The optional chaining (?.) operator accesses an object's property or calls a function. If the object accessed or function called using this operator is undefined or ...
JavaScript data types and data structures - JavaScript - MDN
Jul 8, 2025 · Programming languages all have built-in data structures, but these often differ from one language to another. This article attempts to list the built-in data structures available in JavaScript …
Operador condicional (ternario) - JavaScript | MDN
El operador condicional (ternario) es el único operador en JavaScript que tiene tres operandos. Este operador se usa con frecuencia como atajo para la instrucción if.