In this command, if curl success, then res will equal to the output of curl. It seems ‘=’ have higher precedence than ‘||’.
res=$(curl -s "http://example.com")||true
But ‘||’ should have higher precedence than ‘=’ according to this link: https://tldp.org/LDP/abs/html/opprecedence.html#FTN.AEN4290