JS Tutorial

Function Reference

Method Reference

  • JS String
  • JS Array
  • JavaScript Objects


    Merge two Objects in JS

    We can merged two or more objects in JS using spread operator but it override the value with same key name.

    Example

    let object1 = {name:'Vipin Katiyar',age:35};
    let object2 = {name:'Umesh Yadav',gender:'Male'};
    let merged_obj = {...object1,...object2};
    
    console.log(merged_obj);
    //Output : {name: "Umesh Yadav", age: 35, gender: "Male"}