JSFiddle - React, Tailwind, and code Playground

HTML

<div class="red">

  <div class="lightblue">
  </div>
  
</div>

CSS

body {margin:0;}
.red {
  width:100%;
  height:500px;
  background-color:red;
  position:relative;
}

JavaScript

var div = document.querySelector(".lightblue");

var style = [
	"backgroundColor = 'lightblue'",
    "width = '100px'",
    "height = '100px'",
];

for(var i = 0; i < style.length; i++) {
	console.log(div.style + "." + style[i]);
	"div.style." + style[i];

}