Which expression pattern provides a fallback value when an input might be empty?
Select an answer to reveal the explanation.
Short Explanation and Infographic
GitHub Actions expressions use || as the 'or' fallback operator — it returns the left side if truthy, otherwise the right side.
Full explanation below image
Full Explanation
GitHub Actions expressions use the '||' operator for logical OR, which also works as a null-coalescing pattern: '${{ inputs.env || "production" }}' returns 'inputs.env' if it's truthy (non-empty, non-null), otherwise returns 'production'. The '??' nullish coalescing operator from JavaScript is not supported in GitHub Actions expressions. '?:' (ternary from some languages) is not supported either. 'default()' is not a built-in GitHub Actions function. The '||' pattern works because empty string, null, 0, and false are all falsy in GitHub Actions expressions.