mardi 6 janvier 2015

Exiting if/else statements in swift

I just started learning Swift and am having some issues. I need to be able to exit an if statement if a condition is met, but have no idea how to do so. For example:



if variable1 == 0 {
// exit if statement, don't do anything
}
else {
// execute this code


The VB equivalent for this would be exit sub, though that does not work in swift :(


I have tried searching on Google but have not found anything haha. Thanks for your help!!


Aucun commentaire:

Enregistrer un commentaire