how to append strings in js code example Example 1: append string js var s = "1" s += "2" Example 2: javascript add to string var s = 'hell' s = s + 'o'