0

I am brand new to Xcode and swift and following a iOS video tutorial where the teacher is discussing for loops.

my code

let names = ["Chris", "John", "Steven", "Big Ralph"]

for name in names

{
    print ("Hi \(name)")

}

Problem: When I run the loop using Xcode 7.2 it shows (4times)in the playground but I can only see "Hi Big Ralph" as the printed output and not any of the other names in the array. Why is this.

enter image description here

Mikolaj
  • 802
  • 10
  • 18
Chris Dormani
  • 476
  • 8
  • 21

2 Answers2

1

Right click on the view and click on "Value History"

spencer.sm
  • 19,173
  • 10
  • 77
  • 88
1

You can press the button here to see the console log:

enter image description here

It is in the console log

enter image description here

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116