title: Copy properties from one Javascript object to another object
body: <p>Let's say I have 2 objects below:</p>
  <pre><code>const obj1 = {
      propertyA: 'a',
      propertyB: 'b',
      propertyC: 'c',
  }
  
  const obj2 = {
      propertyA:'aa',
      propertyB:'bb',
      ....  //so many properties includes all properties in obj1
      propertyZ:'zz',
  }
  </code></pre>
  <p>I want each property in <code>obj1</code> has same value of property with the same name in <code>obj2</code>. Right now what I do is assign value of each property in <code>obj1</code> :</p>
  <pre><code>     obj1.propertyA = obj2.propertyA;
       obj1.propertyB = obj2.propertyB;
       obj1.propertyC = obj2.propertyC;
  </code></pre>
  <p>In my actual case <code>obj1</code> has lots more properties so this  is pretty annoying. And so I'm looking for a better way to optimize this, may be a function in Javascript or in some library like <code>Lodash</code> that I don't know. Anyone know how to solve this problem please share with me.</p>