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:

enter image description here

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.

enter image description here


it looks may have changed in xcode 7 - @mikemeyers mentions in comments, need right click on quick view window , select value history option.

enter image description here


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -