title: If / else statements within a function
body: <p>I've been going through the Eloquent Javascript book but I just started messing around with some of their examples. I've tried to make a function with multiple different states when you enter in a different value for the function.</p>
  
  <pre><code>const missileLaunch = function() {
      if (missileLaunch(SafeMode)) {
          console.log("The missiles are not ready to launch")
      } else if (missileLaunch(Loaded)) {
          console.log("The missiles have been targeted")
      } else if (missileLaunch(UraniumNotEnriched)) {
          console.log("The uranium has ot been enriched enough")
      }
  };
  
  missileLaunch(SafeMode);
  </code></pre>
  
  <p>It tells me the SafeMode state of the function is not defined.</p>
  
  <pre><code>missileLaunch(SafeMode);
  </code></pre>