create new object within a function js code example
Example 1: adding function to objects js
var myObj = {
myFunc: function(param){
//do stuff
}
}
Example 2: javascript construct new object
person = new Object();
var myObj = {
myFunc: function(param){
//do stuff
}
}
person = new Object();