GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing processing.org — ?: (conditional) / Reference Reference+ Name?: (conditional)DescriptionA shortcut for writing an if and else structure. The conditional operator, ?: is sometimes called the ternary operator, an operator that takes three arguments. If the test evaluates to true, expression1 is evaluated and returned. If the condition evaluates to false, expression2 is evaluated and returned.
result = test ? expression1 : expression2 is equivalent to this structure: if (test) {Examples
Syntax
Parameters
Return
![]() This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |