Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

Swift continue with while loop

// program to print odd numbers from 1 to 10

var num = 0

while num <= 10{
  num += 1

  if (num % 2) == 0 {
    continue
}

print("(num)")
}
 
PREVIOUS NEXT
Tagged: #Swift #continue #loop
ADD COMMENT
Topic
Name
3+8 =