Hi. I was wondering how to fix this error in Xcode from the Youtube video: https://www.youtube.com/watch?v=Afp-qjZHZvs.
The code I typed was
,
else if leftNumber < rightNumber {}
,
Thanks for any Help!
Simple if else statements should be structured like this:
if condition {
// condition is true
statements
} else {
// condition is false
statements
}
Nested If else statements need to be structured like this:
if condition {
statements
} else if condition {
statements
} else if condition {
statements
} else {
// all of the above are tested as false
statements
}