See the Pen thecodelog.com - ES6 Object Static Methods 1 by Deano (@deangilewicz) on CodePen.
Object.getPrototypeOf() returns the prototype (i.e. the value of the internal [[Prototype]] property) of the specified object.
See the Pen thecodelog.com - ES6 Object Static Methods 2 by Deano (@deangilewicz) on CodePen.
Object.setPrototypeOf() sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or null. It takes two parameters: the object which is to have its prototype set, and the object’s new prototype (an object or null).
See the Pen thecodelog.com - ES6 Object Static Methods 3 by Deano (@deangilewicz) on CodePen.
Object.assign() is used to copy / mix the values of all enumerable own properties from one or more source objects to a target object. It will return the target object. It takes two parameters: the target, and a list of sources processed in the order passed.
See the Pen thecodelog.com - ES6 Object Static Methods 4 by Deano (@deangilewicz) on CodePen.
The properties are overwritten by other objects that have the same properties later in the parameters order.
See the Pen thecodelog.com - ES6 Object Static Methods 5 by Deano (@deangilewicz) on CodePen.
Only the properties a, b, c, e, and Symbol(“g”) will be copied to target.
See the Pen thecodelog.com - ES6 Object Static Methods 6 by Deano (@deangilewicz) on CodePen.
The d, f, and Symbol(“h”) properties are omitted from copying since they are non-enumerable properties and non-owned properties so excluded from the assignment. e is copied as a normal property assignment, not duplicated as a read-only property.
Object.create() is the ES5 standard utility that creates an empty object that is [[Prototype]]-linked.
See the Pen thecodelog.com - ES6 Object Static Methods 7 by Deano (@deangilewicz) on CodePen.
Object.getOwnPropertySymbols() returns an array of all symbol properties found directly on an object.
See the Pen thecodelog.com - ES6 Object Static Methods 8 by Deano (@deangilewicz) on CodePen.
Object.preventExtensions() prevents new properties from ever being added to an object (i.e. prevents future extensions to the object).
See the Pen thecodelog.com - ES6 Object Static Methods 9 by Deano (@deangilewicz) on CodePen.
Object.isExtensible() determines if an object is extensible (whether it can have new properties added to it).
See the Pen thecodelog.com - ES6 Object Static Methods 10 by Deano (@deangilewicz) on CodePen.