Pardon me as I am a newbie on this language.
Edit: Is there a way to reverse the position of a array element?
I am trying to create a function that test the given input if its a palindrome or not. I'm trying to avoid using functions using reversed()
let word = ["T","E","S","T"]
var temp = [String]()
let index_count = 3
for words in word{
var text:String = words
print(text)
temp.insert(text, atIndex:index_count)
index_count = index_count - 1
}
wordis actually anArray<String>, and notString,wordsis aString2)index_countis being mutated despite being aletconstanty, 3) Swapping those letters has nothing to do with appending. OP, could you please clarify exactly what you wish to do?