Assume I have executed this js code:
var container=function() {
//do something
}
container.a=function {
//do something 2
}
container.b='34'
Here, in order to change container.a function for example I need to do:
container.a=function() {
//do something 3
}
How do I change the function container() ?
You just assign a function to the variable:
This of course means that you get a new function object, which doesn’t have the
aandbproperties. If you want to keep them, you have to copy them to the new function: