title: User defined objects in Javascript
body: <p>ok, so below is the code that creates a user defined object with two properties. Runs fine but the values gets over-written. How do i display all the values that the user enters in the object &quot;objOrg&quot;</p>
  <pre><code>const size = Number(prompt(&quot;Enter the number of employees to be registered&quot;));
  const orgObj = {};
      for (let i = 0; i&lt;=size; i++){
          Object.defineProperties(orgObj, {
                empName: {
                   value: prompt(&quot;Enter employee name&quot;),
                   writable: true
          },
                empId: {
                   value: prompt(&quot;Enter employee id&quot;),
                   writable: true
          }
      })
  
  }
  console.log(orgObj);
  </code></pre>