0
let age = 25      
if case 18...35 = age where age >= 21 { 
    print ("In Cool Demographic and of drinking age")
}

In Swift, when I type the code above, it says right before in "where", there's a little red line under the "w" and it says:

expected ',' joining parts of a multi- clause condition

Is there any way to fix/ work around this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

0 Answers0