Iterating through an array only gets the first value in Swift Playground -
i'm aware pretty basic question has me stumped , figure out why. have array of names , iterate through them them single names, although when using for in
loop produce first name, code:
var arraya = ["mike", "james", "stacey", "steve"] var str = string() array in arraya { str = array println(str)//just prints steve }
the problem prints steve, want able access name singley
this seeing:
if you're using playground, might need change view in order see results..
you need hover on quick view display in order find "all values" icon.
it looks may have changed in xcode 7 - @mikemeyers mentions in comments, need right click on quick view window , select value history option.
Comments
Post a Comment