creating js objects

JavaScript
let obj = {
// fields
  name:"value",
  num: 123,
//methods
  foo: function(){}
  
}var car = {type:"Fiat", model:"500", color:"white"};
 
Source

Also in JavaScript: