How to create palindrome using for in in swift

// creating array literal
var text = [“l”, “e”, “v”, “e”, “l”]
var reversed = String

for num in text {
reversed.append(num)
}

// check wheter or not we have a palindrome
if text == reversed {
print(“We have a palindrome!”)
} else {
print("(text) is not palindrome")
}