In Swift, you can concatenate strings using the + operator:
var hello = "Hello" var comma = "," var world = "World" var exclamation = "!" var space = " " var combinedStr = hello + comma + space + world + exclamation print(combinedStr) //Hello, World!
You can use the addition assignment operator += to append a string to another string:
var hello = "Hello" hello += ", World!" print(hello) //Hello, World!"
Here, you are concatenating variables of the same type, which in this case is String.