how to create a new variable of an bject in Java script 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();