creating an object javascript

JavaScript
let obj = {
// fields
  name:"value",
  num: 123,
//methods
  foo: function(){}
  
}
Source

Also in JavaScript: