Crash course! The format function takes two or more “arguments” which come between the () and are separated by commas. For your case each argument can be a variable like the story format example, or literal text wrapped in quotes like the heading example.
The first argument is the template, each %s is replaced by the next argument consecutively until everything is matched up. Then the function returns that template with everything filled in. Just be sure to include the correct number of arguments in the correct order to match the format template.
So if you have a variable named winner with the value “Bob” then format('The %s is: %s', 'winner', winner)
will give you “The winner is: Bob”
You can use functions in either the Value or Expression inputs. In the Value input that would look like The maximum is {max(score1, score2)}
and in the Expression input you can do either 'The maximum is {max(score1, score2)}'
or 'The maximum is ' + max(score1, score2)
which will produce the same result.
The reason it works for your HTML issue is because that bug only affects the Expression editor and you’re typing the HTML into the variable value instead.