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 :: Swift Symmetric Difference between Two Sets 
Swift :: swift ns_enum generic name 
Swift :: swift print struct name 
Swift :: while loops swift 
Swift :: Swift Array With Mixed Data Types 
Swift :: Swift Tuple in Switch Statement 
Swift :: Swift Nested Function with Parameters 
Swift :: Swift static Property 
Swift :: swift UIColor to String 
Swift :: swift multiline comment 
Swift :: Swift self property 
Swift :: Swift Arithmetic Operators 
Swift :: swiftui slide menu 
Swift :: Swift Labeled Statement with break 
Swift :: swift closures 
Swift :: swift isMemberOf 
Swift :: AMAZONCONNECT 
Swift :: Swift print() with terminator 
Swift :: Swift for Loop with Stride Function 
Swift :: move to nect cell of collection after some time automatically in ios swift 
Ruby :: rails resources except 
Ruby :: dotenv-rails comments 
Ruby :: how to create migration with uniqueness inrails 
Ruby :: run a specific migration rails 
Ruby :: ruby each_with_object 
Ruby :: rails date format dd/mm/yyyy 
Ruby :: rails activerecord to hash 
Ruby :: ruby loop each with index 
Ruby :: ruby on rails validates presence of multiple fields 
Ruby :: ruby delete first element of array 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =