switch statement
var secondaryColor = "green"
switch secondaryColor {
case "orange":
print("A mixture of red and yellow")
case "purple":
print("A mix of red and blue")
default:
print("This may not be a secondary color")
}
// print: mix of blue and yellow
Comments