/* 单例模式 */
let _instance = function(fn){
var instance
return function(){
if(!instance){
console.log('第一次')
instance= fn.apply(this, arguments)
}
return instance
}
}
let a =function(){
return {
a:1
}
}
let dd = _instance(a)
let fc = dd()
let fcc = dd()
console.log(fc,fcc,fc==fcc)