Skip to content

Instantly share code, notes, and snippets.

@joemaffei
Created January 25, 2024 03:42
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 joemaffei/e98a5b9b1c2f370dd8cce8e94c270559 to your computer and use it in GitHub Desktop.
Save joemaffei/e98a5b9b1c2f370dd8cce8e94c270559 to your computer and use it in GitHub Desktop.
Window Ipsum: random text from the keys of the window object
function windowIpsum(numberOfWords) {
const keys = Object.keys(window);
return [...Array(numberOfWords)]
.map(() => {
return keys[Math.floor(Math.random() * keys.length)];
})
.join(' ');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment