title: What is missing in my if statement to validate Credit Card function and how to return a value in the text?
body: <p>Missing link to credit card validation using only JavaScript. Needs to have atleast two different digits and all digits should not be the same. I am unable to return values in the text please help thank you. Here is a link to the <a href="https://www.teaching-materials.org/javascript/exercises/creditcard" rel="nofollow noreferrer">exercise</a>.</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
   &lt;head&gt;
   &lt;meta charset="utf-8"&gt;
  
  &lt;title&gt;Credit Card Validation&lt;/title&gt;
  &lt;meta name="description" content="CHANGE THIS CONTENT DESCRIPTION"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;span&gt;Credit Card Number* :&lt;/span&gt;
  
    &lt;input class="inputForm" type="number" id="ccn" name="inputStealMoney" 
  placeholder="Enter Credit Card Number"&gt;&lt;span class="restriction" id="CCNSpan"&gt;&lt;/span&gt;
    &lt;button type="button" onclick="CCNSpan"&gt;Submit&lt;/button&gt;
    &lt;br&gt;
    &lt;p id="CCNSpan"&gt;Text&lt;/p&gt;
    &lt;script&gt;
  
      function funcCall() {
        validFormCCN();
      }
      function validFormCCN() {
        var x, textC;
        x = document.getElementById('ccn').value;
        //If statement below is blank in the last () paranthesis. It needs to be filled with 'different numbers' to work
        if (isNaN(x) &amp;&amp; (x%2) ==0 &amp;&amp; x.length==16 &amp;&amp; ()) {
      /*The if statement above is NaN() and x%2==0 is even and x.length is 16 digits and the blank () paranthesis where all the digits cannot be the same with atleast two different digits*/ 
          return true;
       }
         else {
          return false;
        }
      }
      document.getElementById("CCNSpan").innerHTML = textC;
  
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>