console
var CreateDiv = function(html){
this.html = html;
this.init();
}
CreateDiv.prototype.init = function(){
var div = document.createElement('div');
div.innerHTML = this.html;
document.body.appendChild(div)
}
var ProxySingletonCreateDiv = (function(){
var instance;
return function(html){
if(!instance){
instance = new CreateDiv(html)
}
return instance
}
})();
console.log()
console.log(new ProxySingletonCreateDiv('seven1') === new ProxySingletonCreateDiv('seven2'))
<html>
<body>
</body>
</html>