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.


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