javascript new object creation code example
Example 1: creating an object javascript
let obj = {
// fields
name:"value",
num: 123,
//methods
foo: function(){}
}
Example 2: javascript construct new object
person = new Object();
let obj = {
// fields
name:"value",
num: 123,
//methods
foo: function(){}
}
person = new Object();