title: I have an endless loop in Javascript
body: <p>Whenever I run this code, the browser crashes. Am I making a stupid mistake, or is there something seriously wrong with my code? 
  I have tried as much as possible to debug my code, but when put through debuggers, there is apparently nothing wrong with my code. WHAT IS HAPPENING? Your help is very much appreciated. </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 FrogFunction() {
    var yedec;
    var decidertwo;
    var decfrog;
    var ChordProgression = ["C Minor"];
    var decider = Math.random();
    var CurrentChord;
    if (decider &lt;= 0.25) {
      var CurrentChord = "D Minor";
    } else if (decider &gt; 0.25 &amp;&amp; decider &lt;= 0.5) {
      var CurrentChord = "E♭ Major";
    } else if (decider &gt; 0.5 &amp;&amp; decider &lt;= 0.75) {
      var CurrentChord = "F Minor";
    } else if (decider &gt; 0.75 &amp;&amp; decider &lt;= 1) {
      var CurrentChord = "A♭ Major";
    }
    ChordProgression.push(CurrentChord);
    while (CurrentChord != "B♭ Major" || CurrentChord != "G Major") {
  
  
      //if dminor
      if (CurrentChord = "D Minor") {
        decidertwo = Math.random();
        if (decidertwo &lt;= 0.5) {
          CurrentChord = "G Major";
        } else {
          CurrentChord = "B♭ Major";
        }
  
      }
  
  
      //if dminor
  
      //if e flat major
      else if (CurrentChord = "E♭ Major") {
        yedecider = Math.random();
        if (yedecider &lt;= 0.3) {
          CurrentChord = "F Minor";
        } else if (yedecider &lt;= 0.6 &amp;&amp; yedecider &gt; 0.3) {
          CurrentChord = "G Major";
        } else {
          CurrentChord = "A♭ Major";
        }
      }
      //if e flat major
  
  
      //if f minor
      else if (CurrentChord = "F Minor") {
        decfrog = Math.random();
        if (decfrog &lt;= 0.5) {
          CurrentChord = "G Major";
        } else {
          CurrentChord = "B♭ Major";
        }
      }
      //if f minor
  
      //if a flat major
      else if (CurrentChord = "A♭ Major") {
        yedec = Math.random();
        if (yedec &lt;= 0.25) {
          CurrentChord = "E♭ Major";
        } else if (yedec &lt;= 0.5 &amp;&amp; yedecider &gt; 0.25) {
          CurrentChord = "F Minor";
        } else if (yedec &lt;= 0.75 &amp;&amp; yedecider &gt; 0.5) {
          CurrentChord = "G Major";
        } else {
          CurrentChord = "B♭ Major"
        }
      }
      //if a flat major
  
  
      ChordProgression.push(CurrentChord);
      //past this bracket is the end bracket of the while loop
    }
  
    document.getElementById("PlaceForChords").innerHTML = ChordProgression;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;center&gt;
    &lt;p&gt;&lt;/p&gt;
    &lt;p&gt;&lt;button onclick="FrogFunction()"&gt;Generate Chords&lt;/button&gt;&lt;/p&gt;
    &lt;p id="PlaceForChords"&gt;&lt;/p&gt;
  &lt;/center&gt;</code></pre>
  </div>
  </div>
  </p>