Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

switch statements swift

var x = 1

switch x {
  case 0: // if x = 0
  	print("x = 0")
  case 1: // if x = 1
  	print("x = 1")
  default: // if x is not 0 nor 1
  	print("no x value")
}
 
PREVIOUS NEXT
Tagged: #switch #statements #swift
ADD COMMENT
Topic
Name
3+4 =