title: Why is my JavaScript validator not working?
body: <p>I'm trying to make a validator using JavaScript to detect the number of numbers in a textarea, but it isn't showing anything at all.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var number = document.getElementById("textarea");
  var length = number.length;
  if (length != 16) {
      document.getElementById("wrongOrRight").innerHTML = "Wrong credit card number! Please try again!";
  }
  else if (length = 16) {
      document.getElementById("wrongOrRight").innerHTML = "Correct number!";
  }
  else {
      document.getElementById("wrongOrRight").innerHTML = "Just to see if it works";
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>textarea {
      border: 2px solid #0095FF;
      border-radius: 7px;
  }
  h4 {
      color: red;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF.8"&gt;
      &lt;title&gt;Validator&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="css.css" /&gt;
      &lt;script src="javascript.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;textarea id="textarea" placeholder="Enter your credit card number here for chocolate! No scam!" cols="50" rows="1" autofocus="autofocus"&gt;&lt;/textarea&gt;
  &lt;h4 id="wrongOrRight"&gt;&lt;/h4&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>