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