Elvis operator

noun

Elvis operator

noun

Etymology The notation ?: humorously reinterpreted as an emoticon representing the eyes and hairstyle of Elvis Presley.

1

Computing, Engineering, Mathematics, Natural sciences, Physical sciences, Programming, Sciences Informal A binary operator that returns its first operand if that operand evaluates to true, and otherwise evaluates and returns its second operand.

Related terms
ternary operator, walrus operator

Entry derived from the Wiktionary, under licence CC BY-SA 4.0 — list of authors.