using object properties in object function js code example
Example 1: adding function to objects js
var myObj = {
myFunc: function(param){
//do stuff
}
}
Example 2: objects in javascript
let name = {
name1: 'mark'
}
var myObj = {
myFunc: function(param){
//do stuff
}
}
let name = {
name1: 'mark'
}