Strings concatenating in Swift
Forums:
let s1 = "three"
let s2 = "two"
var s3 = s1 + ", " + s2
s3 += ", one"
let sGo = s3 + ", " + "go!";
//sGo is "three, two, one, go!"
- Log in to post comments
let s1 = "three"
let s2 = "two"
var s3 = s1 + ", " + s2
s3 += ", one"
let sGo = s3 + ", " + "go!";
//sGo is "three, two, one, go!"