util.LoggerFactory = function(){
var messageListener = {}
this.count = 0//这个是定义了一个变量count吗?作用域是多大?
this.max   = 1000
this.cache = []
this.dateformat = //这个等于号后空的是表示null吗?

this.onMessage = function(func,scope){
if(typeof func == "function")
messageListener = {func:func,scope:scope || null}
}

解决方案 »

  1.   

    util.LoggerFactory = function(){
        var messageListener = {}
        this.count = 0 //局部变量,仅在util.LoggerFactory()函数内部有效
        this.max   = 1000
        this.cache = []
        this.dateformat = //语法错误
        
        this.onMessage = function(func,scope){
            if(typeof func == "function")
                messageListener = {func:func,scope:scope || null}
        }
      

  2.   

    util.LoggerFactory = function(){
        var messageListener = {}
        this.count = 0 //局部变量,仅在util.LoggerFactory()函数内部有效
        this.max   = 1000
        this.cache = []
        this.dateformat = //语法错误
        
        this.onMessage = function(func,scope){
            if(typeof func == "function")
                messageListener = {func:func,scope:scope || null}
        }
      

  3.   

    楼上已经解释的挺清楚的了
    this.count  相当于private 只能在当前function中或当前对象中访问 
    this.dateformat =  这句话js解释到这里会报错的