title: How to make JavaScript output?
body: <p>I've been trying to make the following code to output a value based on the number allocated, to a span. I'm not sure why or how I'm going wrong.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() {
    var league = 1
    var shirt = 2
  
    if (league == 1) {
      if (shirt == 1) {
        document.getElementById("shirt").innerHTML = "Score 70+ Goals = 7,500,000";
      } else if (shirt == 2) {
        document.getElementById("shirt").innerHTML = "Score 60+ Goals = 6,000,000";
      } else if (shirt == 3) {
        document.getElementById("shirt").innerHTML = "Score 55+ Goals = 5,500,000";
      } else if (shirt == 4) {
        document.getElementById("shirt").innerHTML = "Score 50+ Goals = 5,000,000";
      } else if (shirt == 5) {
        document.getElementById("shirt").innerHTML = "Score 45+ Goals = 4,500,000";
      } else if (shirt == 6) {
        document.getElementById("shirt").innerHTML = "Score 40+ Goals = 4,000,000";
      } else if (shirt == 7) {
        document.getElementById("shirt").innerHTML = "Score 35+ Goals = 3,000,000";
      }
    } else if (league == 2) {
      if (shirt == 1) {
        document.getElementById("shirt").innerHTML = "Score 70+ Goals = 7,000,000";
      } else if (shirt == 2) {
        document.getElementById("shirt").innerHTML = "Score 60+ Goals = 5,500,000";
      } else if (shirt == 3) {
        document.getElementById("shirt").innerHTML = "Score 55+ Goals = 5,000,000";
      } else if (shirt == 4) {
        document.getElementById("shirt").innerHTML = "Score 50+ Goals = 4,500,000";
      } else if (shirt == 5) {
        document.getElementById("shirt").innerHTML = "Score 45+ Goals = 4,000,000";
      } else if (shirt == 6) {
        document.getElementById("shirt").innerHTML = "Score 40+ Goals = 3,500,000";
      } else if (shirt == 7) {
        document.getElementById("shirt").innerHTML = "Score 35+ Goals = 2,500,000";
      }
    } else if (league == 3) {
      if (shirt == 1) {
        document.getElementById("shirt").innerHTML = "Score 70+ Goals = 6,500,000";
      } else if (shirt == 2) {
        document.getElementById("shirt").innerHTML = "Score 60+ Goals = 5,000,000";
      } else if (shirt == 3) {
        document.getElementById("shirt").innerHTML = "Score 55+ Goals = 4,500,000";
      } else if (shirt == 4) {
        document.getElementById("shirt").innerHTML = "Score 50+ Goals = 4,000,000";
      } else if (shirt == 5) {
        document.getElementById("shirt").innerHTML = "Score 45+ Goals = 3,500,000";
      } else if (shirt == 6) {
        document.getElementById("shirt").innerHTML = "Score 40+ Goals = 3,000,000";
      } else if (shirt == 7) {
        document.getElementById("shirt").innerHTML = "Score 35+ Goals = 2,000,000";
      }
    }
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;span id="shirt"&gt;Placeholder text&lt;/span&gt;</code></pre>
  </div>
  </div>
  </p>