function test(){ var banji=[] var obj = { fn1 :function(name){ console.log("haha",name) banji.push(name) console.log('banji'.banji) }, fn2:function(){} } return obj } var zhou = test() zhou.fn1("新增1")