Im trying to have an if statement to check if a double value in a string is larger than 10 but i keen on getting an error "Binary operator '>' cannot be applied to operands of type 'Double?' and 'Int'" anyone know what i'm doing wrong.
swift 4
i'm using a variable string because i need it to be a string so i can format it later on, i defined it as
swift 4
Code:
if (Double(MyValue) > 10) {
// value is bigger than 10
} else {
// do something else
}
i'm using a variable string because i need it to be a string so i can format it later on, i defined it as
Code:
var MyValue = ""