Yoda condition

Meaning

Noun

  • A condition with the usual order of operands reversed — e.g. if (18 == age) rather than if (age == 18) — so as to avoid the accidental misuse of = (assignment) instead of == (equality), a mistake that is harder to spot when using the normal order of operands.

Origin

  • In allusion to the somewhat grammatically reversed speech style of Yoda, a character in the Star Wars franchise.

Modern English dictionary

Explore and search massive catalog of over 900,000 word meanings.

Word of the Day

Get a curated memorable word every day.

Challenge yourself

Level up your vocabulary by setting personal goals.

And much more

Try out Vedaist now.