Is it possible to create a div with a unique ID using a for loop?
for (var i = 0, n = 4; i < n; i++) {
var divTag = document.createElement("div");
divTag.id = "div"i;
divTag.innerHTML = Date();
document.body.appendChild(divTag);
}
Shouldn't this code produce 4 Unique DIVs containing the current date? At the moment it returns nothing.