【发布时间】:2026-01-11 07:20:04
【问题描述】:
我可以从私有方法中调用公共方法吗:
var myObject = function() {
var p = 'private var';
function private_method1() {
// can I call public method "public_method1" from this(private_method1) one and if yes HOW?
}
return {
public_method1: function() {
// do stuff here
}
};
} ();
【问题讨论】:
标签: javascript oop