Skip to content

Instantly share code, notes, and snippets.

@antenando
Created November 23, 2017 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antenando/fa79e6eef7af8e0723736564af2a0ca3 to your computer and use it in GitHub Desktop.
Save antenando/fa79e6eef7af8e0723736564af2a0ca3 to your computer and use it in GitHub Desktop.
const rand = () => Math.floor(Math.random() * 256)
const r = () => (`rgb(${rand()}, ${rand()}, ${rand()})`)
const divs = document.querySelectorAll('div')
const viewDestroy = () => divs.forEach(d => d.style.background = r())
setInterval(viewDestroy, 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment