JSFiddle - React, Tailwind, and code Playground

HTML

<body>
    
<div id="espacioPrueva">
</div>
<div id="log"></div>
    
</body>

CSS

#log{
    width:200px;
    height:100px;
    color:#000000;
    font-size:25px;
}

#espacioPrueva div { float: left; }

JavaScript

function prototype(id){	
    this.ID = id;
    this.CrearDiv = function CrearDivs(){
        var ID = this.ID;
        var Capa = document.getElementById('espacioPrueva');
        var DivPrueva = document.createElement('div');
        DivPrueva.style.width = 200+'px';
        DivPrueva.style.height = 200+'px';
        DivPrueva.style.margin = '10px 10px';
        DivPrueva.style.background = 'hsla(120,100%,50%,1)';
        Capa.appendChild(DivPrueva);
      
		DivPrueva.addEventListener("mouseover", function (){
        document.getElementById('log').innerHTML ='ObjetoPrueva ' +ID;
        }, false);
	
	}
	
}

var ObjetoPruevaUno = new  prototype(1);
ObjetoPruevaUno.CrearDiv();

var ObjetoPruevaDos = new  prototype(2);
ObjetoPruevaDos.CrearDiv();