Last Updated :2025/12/04

Elvis operator

Noun
informal
Japanese Meaning
(プログラミングの文脈で使用される用語)第一オペランドが真(または真と評価される値)の場合、その値を返し、そうでない場合は第二オペランドを評価してその結果を返す二項演算子。
What is this buttons?

ユーザー入力をチェックするとき、入力が偽と評価される場合にデフォルト値を提供するために、最初のオペランドが真と評価されればそれを返し、そうでなければ2番目のオペランドを評価して返す二項演算子をよく使います。

plural

Quizzes for review

(programming, informal) A binary operator that returns its first operand if that operand evaluates to true, and otherwise evaluates and returns its second operand.

音声機能が動作しない場合はこちらをご確認ください
See correct answer

Elvis operator

When checking user input, I often use the Elvis operator to provide a default value if the input is falsy.

See correct answer

When checking user input, I often use the Elvis operator to provide a default value if the input is falsy.

音声機能が動作しない場合はこちらをご確認ください

English - English

Word Edit Setting
  • Users who have edit permission for words - All Users
  • Screen new word creation
  • Screen word edits
  • Screen word deletion
  • Screen the creation of new headword that may be duplicates
  • Screen changing entry name
  • Users authorized to vote on judging - Editor
  • Number of votes required for decision - 1
Sentence Edit Setting
  • Users who have edit permission for sentences - All Users
  • Screen sentence deletion
  • Users authorized to vote on judging - Editor
  • Number of votes required for decision - 1
Quiz Edit Setting
  • Users who have edit permission for quizzes - All Users
  • Users authorized to vote on judging - Editor
  • Number of votes required for decision - 1
Editing Guideline

Login / Sign up

 

Download the app!
DiQt

DiQt

Free

★★★★★★★★★★