Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift continue

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

continue keyword in swift language

var songs = ["Shake it Off", "You Belong with Me", "Look What You Made Me Do"]

for song in songs {
    if song == "You Belong with Me" {
        continue
    }

    print("My favorite song is (song)")
}
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 String Example 
Swift :: Swift Logical Operators 
Swift :: uitableview disable sticky header 
Swift :: Swift Nil-coalescing operator 
Swift :: swift variable 
Swift :: microsoft flight simulator uses which language 
Swift :: xcode combine calayer into an image 
Ruby :: How to find database name in rails console 
Ruby :: turn an array of string into integer in ruby 
Ruby :: ruby string to date 
Ruby :: ruby refinement import dynamic methods 
Ruby :: get current year in ruby 
Ruby :: rails task arguments 
Ruby :: find path of module in ruby 
Ruby :: create rails project with postgres 
Ruby :: rails check_box_tag 
Ruby :: ruby connect database 
Ruby :: remove gem rails 
Ruby :: how to link to with font awesome rails 
Ruby :: ruby sort array numerically 
Ruby :: rails rescue puts error 
Ruby :: installing ruby version using Rbenv 
Ruby :: ruby array 
Ruby :: command to install ruby gems 
Ruby :: ruby for 
Ruby :: ruby frozen_string_literal 
Ruby :: how do I update an index in rails 
Ruby :: insert element in the middle of an array ruby 
Ruby :: ruby new class params 
Ruby :: using nested select in rails query 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =