I have array and need to reverse it without Array.reverse
method, only with a for
loop.
var names:[String] = ["Apple", "Microsoft", "Sony", "Lenovo", "Asus"]
I have array and need to reverse it without Array.reverse
method, only with a for
loop.
var names:[String] = ["Apple", "Microsoft", "Sony", "Lenovo", "Asus"]
do you mean
or
Or you can write extension of course
Ignoring checks for emptiness..