the Elvis operator ?: is a binary operator that returns its first operand if that operand is true, and otherwise evaluates and returns its second operand.
In a language that supports the Elvis operator, something like this:
x = f() ?: g()
will set x equal to the result of f() if that result is a true value, and to the result of g() otherwise.
It is equivalent to this example, using the Ternary Operator:
x = f() ? f() : g()
except that it does not evaluate the f() twice if it is true.
Credit:Wiki