Skip to content

Instantly share code, notes, and snippets.

@MoritzGiessmann
Created October 16, 2020 17:38
Show Gist options
  • Save MoritzGiessmann/86b050ad3c9581855738ca87f4a49dfc to your computer and use it in GitHub Desktop.
Save MoritzGiessmann/86b050ad3c9581855738ca87f4a49dfc to your computer and use it in GitHub Desktop.
JavaScript to select a random HTML element on the MDN elements list https://developer.mozilla.org/en-US/docs/Web/HTML/Element
// Just put it into the js console
document.querySelectorAll('a > code')[Math.floor(Math.random() * Math.floor(100))].innerText
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment