houseObj.listen = function(key,fn){ // if(!this.listen[key]){ // this.listen[key] = []; // }else{ // this.listen.push(fn); // } (this.listen[key] || (this.listen[key] = [])).push(fun) }