title: Add new item to object and don't update existing key of an object in js
body: <p>I have 2 objects , I will like to create function where I would be able to pass my both object and that function should give be new object which add new items found in second object but existing keys on first object should not be updated </p>
  
  <p>For Example:-</p>
  
  <pre><code>var a  = {
     name:'luisa kate should remain same',
     cast:'THis will remain as it is.'
  }
  
  var b = {
    name:'luisa kate should be not updated object because there is already name in object a ',
    school:'lords light academy should be added in new object'
  }
  
   function update(a, b) {
     var c = {};
     for (var key in a) {
       c[key] = a[key];
     }
     for (var key in b){
       if(key in b){
  
       }else{
         c[key] = (Array.isArray(a[key])) ? a[key].concat(b[key]) : b[key];  
       }
     } 
     return c
   }
   console.log(update(a,b))
  </code></pre>
  
  <p>Expected Output:-</p>
  
  <pre><code>{
     name:'luisa kate should remain same',
     cast:'THis will remain as it is.'
     school:'lords light academy should be added in new object'
  }
  </code></pre>
  
  <p>I played lot with my above update function but I could not solve please help me. </p>