title: Google Script call another function to return a value
body: <p>I'm getting to grips with beginner methods of GScript now but so far have only used one function. Could someone show me how to 'call' another function to check for something and then return a TRUE or FALSE. Here is my attempt (it will eventually check a lot of things but I'm just checking one thing to start..)</p>
  
  <pre><code>Function callAnotherFunctionAndGetResult () {
  MyResult = call(CheckTrueFalse)
  if(MyResult = True then.. do something)
  };
  
  function CheckTrueFalse() {
  if(3 &gt; 2) { 
  CheckTrueFalse = TRUE
  Else
  CheckTrueFalse = FALSE
  };
  </code></pre>
  
  <p>So basically I just want to get the other function to check something (in this case is 3 bigger than 2?) if it is then return TRUE. From this I should have the knowledge to modify for the real purpose. I'm used to Visual Basic so I've written it more how that would look - I know that won't work. Could someone help me convert so will work with Google Script please?</p>