I'm writing a function like
function myFunction1 ( myFunction2ReturnBool ){
    if (myFunction2ReturnBool()) {
         // Do something if myFunction2ReturnedBool() returned true. 
    }
}
Here, myFunction2ReturnBool() is a function that checks if a condition is fulfilled. Is there a way to get this to work? 
 
    