different ways of object creation in javascript code example
Example 1: creating an object javascript
let obj = {
// fields
name:"value",
num: 123,
//methods
foo: function(){}
}
Example 2: how to create a object in javascript
var a = {
name: "aakash",
age:30
}