Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AhmedMenaim/b1fea20ed75e1a99bde8aa49a0ccda05 to your computer and use it in GitHub Desktop.
Save AhmedMenaim/b1fea20ed75e1a99bde8aa49a0ccda05 to your computer and use it in GitHub Desktop.
Menaim Academy - Swift Course - Conditional Statements - If else
import UIKit
var greeting = "Hello, playground"
let number = 6
if number == 5 { // equal comparison
print ("Number is correct")
}
else if number == 6 {
print("\(number) & Number is correct")
}
else {
print("Number is incorrect")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment