JSFiddle - React, Tailwind, and code Playground

HTML

<body>

</body>

CSS

.test{
        position : absolute;
        width : 15px;
        height : 15px;
        border-radius:15px;
        background-color : black; 
      }

JavaScript

$(function() {
        
        for (var i = 0; i < 300; i++){
          $("<div>", {
            class : "test",
            css : {
              opacity : randomOpacity
            }
          }).appendTo("body"); 
        }
       
        
        function randomOpacity(){
          var opac = 0;
             opac =  Math.random() < 1;
          console.log(opac);
        }
        
        randomize();
      });