title: How to check 2 different types of things using ===?
body: <p>I want to check whether the value in an input box is equal to a variable. When I use ===, it returns false but when I use ==, it returns true, provided both are equal.</p>
  
  <pre><code>&lt;input id="g1"&gt;&lt;/input&gt; &lt;button id="b" onclick="myFunction()"&gt;Try&lt;/button&gt;
  function myFunction() {
  var d1;
  d1 = Math.floor(Math.random()*100)
  if( document.getElementById("g1").value ==  d1) {
  document.getElementById("d").innerHTML = "Correct";
  }
  </code></pre>