Skip to content

Instantly share code, notes, and snippets.

@dnjstrom dnjstrom/script.js Secret
Last active Oct 23, 2018

Embed
What would you like to do?
const spinner = document.createElement("div");
spinner.classList.add("spinner");
["ball-1", "ball-2", "ball-3", "ball-4"].forEach(ballNumber => {
const ball = document.createElement("div");
ball.classList.add("ball");
ball.classList.add(ballNumber);
spinner.appendChild(ball);
});
document.body.appendChild(spinner);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.