Live briefing
Everything about Elvis operator
Binary operator in computer programming
In certain computer programming languages, the Elvis operator, often written ?:, is a binary operator that returns the first operand if its value is logically true or returns its second operand if the first operand is not true. That is, it is a short-circuit OR, which returns its first truthy operand. Wikipedia →
đź§ Start here: a 6-step reading path
- Read the overview: Elvis operatorA 5-minute orientation
- Pick up a classic book: Elvis And The Grateful DeadThe most-reprinted book on the subject
- Go sideways: Null coalescing operatorA closely related topic
- Go sideways: Ternary conditional operatorA closely related topic
đź“– Definitions
No dictionary entry for this exact phrase.
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
- No matching papers found.
📚 Books worth reading
Elvis And The Grateful DeadPeggy Webb · 2009
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
đź”— Related topics
- Null coalescing operator The null coalescing operator is a binary operator that is part of the syntax for a basic conditional expression in several programming languages, such…
- Ternary conditional operator In computer programming, the ternary conditional operator is a conditional expression with three parts: the Boolean condition, the then-expression, and…
- Short-circuit evaluation Short-circuit evaluation, minimal evaluation, or McCarthy evaluation (after John McCarthy) is the semantics of some Boolean operators in some programming…
- Safe navigation operator In object-oriented programming, the safe navigation operator (also known as optional chaining operator, safe call operator, null-conditional operator,…
- Boolean data type In computer science, the Boolean is a data type that has one of two possible values representing the two truth values of logic: true and false. It is named…
- Operators in C and C++ This is a list of operators in the C and C++ programming languages. All listed operators are in C++ and lacking indication otherwise, in C as well. Some…
- Operator (computer programming) In computer programming, an operator is a programming language construct that provides functionality that may not be possible to define as a user-defined…
- Three-way comparison In computer science, a three-way comparison takes two values A and B belonging to a type with a total order and determines whether A < B, A = B, or A >…