title: how to compare two strings in javascript if condition
body: <p>I'm having trouble recalling how to compare these two strings in an if statement. What I'm string to do is check if my variable <code>compare</code> equals <code>page1</code> or <code>page2</code> if not, go to the else statement. </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>var compare = "page3";
  
  if (compare === "page1" || "page2") {
    document.body.innerHTML = "github url";
  } else {
    document.body.innerHTML = "non-github url";
  }</code></pre>
  </div>
  </div>
  </p>