//: Playground - noun: a place where people can playimport UIKit// for-infor i in -99...99{ i * i}let array = ["Rinpe", "Bobo", "Lili"]for (index, name) in array.enumerate(){ print("\(index), \(name)");}for (_, name) in array.enumerate(){ print("\(name)")}let dict = [1:"Rinpe", 2:"Bobo", 3:"Lili"]for (key, value) in dict { print("\(key) - \(value)")}// forfor var i = 0; i <= 100; i++{ i * i}// whilevar i = 100;while i > 0 // 符合这个条件才循环下去{ i--}// do-while(无论条件是否符合, 都会执行一次)i = 100repeat{ i--} while i == 100i