📅  最后修改于: 2022-03-11 15:03:17.404000             🧑  作者: Mango
objectName.methodname = functionName;
var myObj = {
myMethod: function(params) {
// ...do something
}
// OR THIS WORKS TOO
myOtherMethod(params) {
// ...do something else
}
};