Using JavaScript's built-in objects
Briefly

Object is the root object of all prototypes in JavaScript. Aside from providing the foundation for the JavaScript object model, Object imparts important methods such as toString() and assign().
The assign() method is a mechanism for cloning objects. It is a static method on Object itself: let object1 = {foo:"bar"}; let object2 = Object.assign({}, object1); console.log(object2.foo); // outputs "bar"
The JSON object is useful all the time. Here's an example that might be familiar: let stringJson = '{"nums": [1,2,3,4]}'; console.log(JSON.parse(stringJson).nums[0]); // outputs "1" let jsonObject = {"letters": [a,b,c,d]}; console.log(JSON.stringify(jsonObject)); // outputs "{\"letters\": [a,b,c,d]}"
Read at InfoWorld
[
add
]
[
|
|
]