title: i want to know if my code is correct and after i want when user give age<18 the onclick button disappears
body: <p>i try to do this: Create a web page using HTML and JavaScript. On the website where your name will appear. · Fill in a table with Student Objects. · These objects have 3 fields (fullname, age, amka). The creation of these objects will be done using Constructor (Note the fullname field is the name and is given as follows: &quot;First name - Last name&quot; · The table that is filled until an object is given under the age of 18. ATTENTION this object does not will be inserted in the table.</p>
  <pre><code> &lt;!DOCTYPE html&gt;
      &lt;html lang=&quot;en&quot;&gt;
          &lt;script&gt;
      
      
      
              function createPerson() {
                      var fullname = document.getElementById('inputValueFullname').value;
                      var age = document.getElementById('inputValueAge').value;
                      var amka = document.getElementById('inputValueAmka').value;
      
              function person(fullname, age, amka) {
              this.fullname = fullname;
              this.age = age;
              this.amka = amka;
        }
        var myArray = [];
        var NewPerson = new person(fullname, age, amka);
        if(age &amp;&amp; age&gt;= 18 &amp;&amp; fullname &amp;&amp; amka){
      
          myArray.push(NewPerson)
        } else {
              
      
        }
      
        console.log(NewPerson);
      }
       &lt;/script&gt;
      
       
      &lt;head&gt;
          &lt;meta charset=&quot;UTF-8&quot;&gt;
          &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
          &lt;title&gt;Document&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
      
          &lt;label&gt;Fullname: &lt;input type=&quot;text&quot; id=&quot;inputValueFullname&quot;&gt;&lt;/label&gt;
          &lt;label&gt;Age:&lt;input type=&quot;text&quot; id=&quot;inputValueAge&quot;&gt;&lt;/label&gt;
          &lt;label&gt;Amka:&lt;input type=&quot;text&quot; id=&quot;inputValueAmka&quot;&gt;&lt;/label&gt;
          &lt;button type=&quot;button&quot; onclick=&quot; createPerson();&quot;&gt;Add&lt;/button&gt;
      
          &lt;table id=&quot;table&quot;&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Name/Surname&lt;/th&gt;
                      &lt;th&gt;Age&lt;/th&gt;
                      &lt;th&gt;AMKA&lt;/th&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
          &lt;/table&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>