how to define an object in an object js code example
Example 1: adding function to objects js
var myObj = {
myFunc: function(param){
//do stuff
}
}
Example 2: create object javascript
const object = {
something: "something";
}
var myObj = {
myFunc: function(param){
//do stuff
}
}
const object = {
something: "something";
}