To concatenate two strings in Swift, you can use the `+` operator or the `String` initializer.
In this example,
str1
and str2
with values "Hello"
and "World"
respectively.str1
and str2
using the `+` operator and store the result in a variable named result
.result
to the console.let str1 = "Hello"
let str2 = "World"
let result = str1 + str2
print(result)
HelloWorld
In this tutorial, we learned How to Concatenate Two Strings in Swift language with well detailed examples.