Strings In Depth12 / 18
Up next

Reverse a string

let s = "swift"
// reversed() yields characters back-to-front; rebuild a String
let back = String(s.reversed())
print(back)
What you're solving

String(s.reversed())