Friends How, after defining a function, change a variable inside it without redefining the function. For example, I have this function
Data = function () {
function n() {
var n = this;
this.same = function (n) {
this.search = function (n, t, i, r) { ... }
this.go = function (n, t) { ... }
this.get = function (n, t) {... }
this.run = function (n, t) { console.log("test") } //change this item
}
}
}()
And I want it to become the following function.
Data = function () {
function n() {
var n = this;
this.same= function (n) {
this.search = function (n, t, i, r) { ... }
this.go = function (n, t) { ... }
this.get = function (n, t) {... }
this.run = function (n, t) { alert("test ok") } // changed
}
}
}()
Data, please?