powered by
Returns the left-hand side if it is not NULL, otherwise returns the right-hand side. This is useful for providing default values.
x %||% y
x if not NULL, otherwise y.
A value to check for NULL.
A default value to return if x is NULL.
NULL %||% "default" "value" %||% "default"
Run the code above in your browser using DataLab