MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / createCircle

Function createCircle

assets/js/hearts.js:1–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1function createCircle() {
2 const circleEl = document.createElement("div");
3 circleEl.classList.add("heart");
4 circleEl.style.top = Math.random() * window.innerHeight + "px";
5 circleEl.style.left = Math.random() * window.innerWidth + "px";
6
7 document.body.appendChild(circleEl);
8
9 setTimeout(() => {
10 circleEl.remove();
11 }, 3000);
12}
13
14setInterval(createCircle, 150);
15

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected