Having issues with getting the returned value of one function to work in another. The returned value always comes back as undefined.
Here's the code I'm using for returning values:
export class HomePage {
variables={
a:1,
b:2,
c:3,
}
constructor(public navCtrl: NavController) {
this.runFunction1();
}
runFunction1(){
if(this.checkFunction2()){
alert("true");
}else{
alert("false");
}
}
checkFunction2(){
if(this.variables.a + this.variables.b >= this.variables.c){
return true;
}else{
return false;
}
}
}