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