How to concatenate two strings in Swift

2 Answers

0 votes
let s1 = "swift java python "
let s2 = "c c++ c#"

let combined = s1 + s2

print(combined)



 
/*
run:
 
swift java python c c++ c#
 
*/

 



answered Jun 4, 2021 by avibootz
0 votes
var s1 = "swift java python "
let s2 = "c c++ c#"

s1 += s2

print(s1)



 
/*
run:
 
swift java python c c++ c#
 
*/

 



answered Jun 4, 2021 by avibootz
...