var d = document;
div = d.body.appendChild(d.createElement("DIV"));
div.id = "hi";
div.innerHTML = "Hello World";
cssStyle = ["fontFamily", "fontStyle"];
cssAn = ["Arial", "italic"];
div.style.cssStyle[0] = cssAn[0];
It does not set the style. Instead it returns an error stating "Cannot set property 0 of undefined". What could I have done wrong?