Created
January 25, 2024 03:42
-
-
Save joemaffei/e98a5b9b1c2f370dd8cce8e94c270559 to your computer and use it in GitHub Desktop.
Window Ipsum: random text from the keys of the window object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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