title: How do I avoid using these functions before they are defined when I'm coding a circular check in Javascript?
body: <p>I keep finding myself in these loops where I'm working through user input to make sure I'm getting what's expected. However, I don't know how to do this without calling a function before it is defined, which gives me eslint error: <a href="https://eslint.org/docs/rules/no-use-before-define" rel="nofollow noreferrer">no-use-before-define</a>.</p>
  
  <pre><code>function tryAgain(){
    alertBadInput();
    getInput();
  }
  
  function getInput(){
    var input = askForInput();
    if (input === 'bad') {
      tryAgain();
      return;
    }
    processInput(input);
  }
  </code></pre>
  
  <p>No matter what order I define these two functions, one of them will be calling another before it is defined.</p>
  
  <p>It seems syntactically valid, but given the eslint error, what other pattern can I use if I were hoping to avoid that error?</p>