Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Tuple iteration
//swift 3.0.2 var dict = [Int: String]() for i in 0..<100{ dict[i] = "\(i)" } //Normal for loops will iterate over a dictionary using a 2-valued tuple, but... for (key, value) in dict { //now you can use the key and the value as separate named values print("Dict key \(key) is \(value)") } //Note that swift doesn't store items in order for performance
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Ok
test
swift Fibonacci Series
Сложение и массивы (копия)
expression resolves to an unused function
Условия и циклы
for...where in swift
card_seat_taken_kuy09
F
Summation Function
Please log in to post a comment.