title: Javascript calling function from inside same function
body: <p>I have a function that does several DDBB calls, so it is asynchronous. </p>
  
  <p>I need to call the function and check a data value (winner) in the JSON object it returns. If it is true i need to call the function again until winner == false.</p>
  
  <p>I can't use while because it is not asynchronous, how can i do this?</p>
  
  <pre><code>  someFunction(function(result) {
       // if result.winner == true repeat 
    })
  </code></pre>