Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift continue

for i in 1...3 {
    if i == 2 {
        continue
    }
    else{
      print(i)
    }
}
//output: 1, 3
Comment

Swift continue Statement With for Loop

for i in 1...5 {
  
  if i == 3 {
    continue
  }
 
print(i)
}
Comment

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)")
}
Comment

PREVIOUS NEXT
Code Example
Swift :: uistackview insets 
Swift :: swift array to string 
Swift :: swiftui color picker 
Swift :: swift create label programmatically 
Swift :: delete padding list swiftui 
Swift :: swift for loop index 
Swift :: swift rotate text 90 degrees 
Swift :: get hours difference between two dates swift 
Swift :: swiftui slider 
Swift :: how to select but not focus textfield swift 
Swift :: get current unix timestamp swift ios 
Swift :: swift do catch 
Swift :: how to add button dynamically in swift 4 
Swift :: prevent iphone to sleep swift 
Swift :: swift create array from range 
Swift :: how to dismiss keyboard in swift 
Swift :: dismiss two view controllers at once swift 
Swift :: tuple swift 
Swift :: How to find index of list item in Swift? 
Swift :: hex color swiftui 
Swift :: HOW TO KNOW IPHONE BETTRY CHARGE IN SWIFTUI 
Swift :: swift get slected row data in tableview cell 
Swift :: Equatable Function Swift 
Swift :: Swift Calling a function in Swift 
Swift :: === in swift 
Swift :: delay code execution swift 4 
Swift :: Swift Variable names cannot start with numbers 
Swift :: Swift Closure as function parameter 
Swift :: waiting for all the threads to finish swift 
Swift :: Swift Raw Values VS Associated Values 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =