The parameter expansion ${var} evaluates to the value of var, which is hello. The trailing x in echo ${var}x is treated as a literal character, resulting in the output hellox. Note that since the braces isolate var, it does not reference the variable varx.