create object let dog = { name: "Sally", breed: "Border Collie", age: 3, bark: function() { alert("Bark! Bark!"); } } code example
Example 1: create object let dog = { name: "Sally", breed: "Border Collie", age: 3, bark: function() { alert("Bark! Bark!"); } }
create object
Example 2: create object let dog = { name: "Sally", breed: "Border Collie", age: 3, bark: function() { alert("Bark! Bark!"); } }
let dog = {
name: "Sally",
breed: "Border Collie",
age: 3,
bark: function() {
alert("Bark! Bark!");
}
}