Swift - Loops
Which of the following correctly creates a stride in Swift that counts down from 10 to 0 by 2?
through includes 0 if reached.stride(from: 10, through: 0, by: -2), which correctly counts 10, 8, 6, 4, 2, 0. stride(from: 10, to: 0, by: -2) uses to: 0 which excludes 0. Options B and C start at 0, which is incorrect.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions