website logo
Navigate through spaces
ChartHop documentation
⌘K
ChartHop Help Center
Getting around in ChartHop
ChartHop for Employees
Implementing ChartHop
ChartHop for Administrators
Carrot reference
ChartHop for Developers
Partners
Release notes
Resources
Docs powered by archbee 
website logo

?: (elvis)

Evaluates the truthiness of the first expression, and returns its value if that value is truthy. If the value of the first expression is not truthy, it returns the value of the second expression.

Syntax

condition ?: ifFalse

  • condition - the conditional expression to be evaluated for truthiness.
  • ifFalse - the expression to be evaluated if condition is not found to be truthy.

Sample usage

name.pref ?: name.first returns someone's preferred first name if available, otherwise returns their formal first name.

See also

  • = (equals)
  • != (not-equals)
  • ç



Updated 03 May 2023
Did this page help you?
Yes
No
PREVIOUS
ç
NEXT
. (dot)
Docs powered by archbee 
TABLE OF CONTENTS
Syntax
Sample usage
See also