DAY #37

Some cool Swift changes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
// Old Swift loop
for var i = 0; i < 100; i++ {}

// Swift 3?+ loop
for i in 0..<100 {}

// Old range operator (this was from the beta of swift)
let someRange = 1..10

// New range operator
let someRange = 1..<10

Originally published 09/22/2021 @ https://pittcsc.org/ Discord

Published here on 09/09/2022. Blog published date reflects the original date of publication.