hi! I’m trying to create an animation but I keep getting this error “cannot read appendChild property”
this is my code:
function divCreater() {
for (let i = 0; i < 100; i++) {
let div = document.createElement("div");
div.classList.add("div")
let a=Math.random()*window.innerWidth;
let b=Math.random()*window.innerHeight;
div.x=a;
div.y=b;
document.body.appendChild(div)
}
};