Which two expression functions return a boolean used to test string prefixes or suffixes? (Choose two)
Select all correct answers, then click Submit.
Short Explanation and Infographic
startsWith and endsWith are the boolean string helpers. format builds strings from templates; join concatenates arrays — neither returns a true/false membership test for prefixes or suffixes.
Full explanation below image
Full Explanation
The GitHub Actions expression language includes startsWith(searchString, searchValue) and endsWith(searchString, searchValue), both returning booleans. They are commonly used in if: conditions, for example startsWith(github.ref, 'refs/tags/v') to detect version tags, or endsWith(github.ref_name, '-hotfix'). format() interpolates values into a format string and returns a string, not a boolean. join() concatenates array elements with a delimiter and also returns a string. Other boolean-friendly helpers include contains() and the comparison operators. When writing multi-condition expressions, combine startsWith/endsWith with && and ||. Multi-select items on the exam often mix string builders with string testers — focus on the return type when choosing.