DEV Community

LilTMGaming
LilTMGaming

Posted on

stars

function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min
}
const STAR_COUNT = 100
let result = ""
for(let i = 0; i < STAR_COUNT; i++){
result +=
${randomNumber(-50, 50)}vw ${randomNumber(-50, 50)}vh ${randomNumber(0, 3)}px ${randomNumber(0, 3)}px #fff,
}
console.log(result.substring(0, result.length - 1))

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more