title: I want to store input data in object but can't be able to do so?
body: <p><strong>html</strong></p>
  
  <pre><code>&lt;form name="AdminForm" onsubmit="return Updateit()"&gt;
        &lt;input type="text" id="name" required&gt;
        &lt;input type="email" id="email" required&gt;
        &lt;input type="number" id="phoneNumb" required&gt;
        &lt;input type="text" id="address" required&gt;
        &lt;input type="submit" value="Submit" class="btn"&gt;
        &lt;input type="reset" value="Reset"&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>var database = {}
  function Updateit(){
      const Name = document.forms["AdminForm"]["name"].value;
      const Email = document.forms["AdminForm"]["email"].value;
      const PhoneNumb = document.forms["AdminForm"]["phoneNumb"].value;
      const Address = document.forms["AdminForm"]["address"].value;
  
      database[Name] = [Email,PhoneNumb.toString(),Address];
      console.log(database[Name]);
  }
  </code></pre>
  
  <p><strong>the data in object is vanished after a Millisecond</strong>
  <em>After input data in form i used to save that data in database object but is not shown in it when i try to display in console or alert.</em></p>