Swift - Loops
What will be the output of this Swift code?
var n = 5
while n > 0 {
print(n * 2)
n -= 2
}var n = 5
while n > 0 {
print(n * 2)
n -= 2
}15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions