This is my counter-proposal (which modifies the data) const data = [ { title: 'AAA', people: [ 'John', 'Megan',] }, { title: 'BBB', people: [ 'Emily', 'Tom'] } ] function mergePeople (data, Object.assign () supports any number of object parameters, so it is possible to combine many objects at once, such as Object.assign (obj_a, obj_b, obj_c). alert("And I'm in your floats!"); return origParseFloat(str); Adding a new value is simple. When overriding Object.Equals, make sure your comparison code never throws an exception. parseFloat = function(str) { So we create a new file and use the below code to override this function and include both files in our Following is the syntax for the window object open () method: let newWindow = window.open (url, windowName, [windowFeatures]); Simply use Object.assign(map2, map1)to update map2(copy key/value of map1to map2) Or you can use, map2 = {map2, map1}to build a new object and replace the map2completely. Using your examples above: Obj.prototype.equals = function (o) { return this.valueOf () === o.valueOf (); }; class Human { constructor (weapon) { this .weapon = weapon; this .health = 100 ; } The common ways to run Javascript after page load are:Add an event listener document.addEventListener ("load", FUNCTION);Add onload to the body tag Defer the script