mercredi 13 mai 2015

How to assign "bigger than but smaller than" using Comparison Operators in Swift?

I want to do something like this:

if (a < 10) {
    println("yes")
} else if (10 < a < 20) {
    println("no")
}

apparently I can't do (X < variable < Y)

Sorry if I didn't redacted this so well, hope you get my issue. Thanks.

Aucun commentaire:

Enregistrer un commentaire