Last active
October 27, 2024 09:30
-
-
Save antic183/851f792180eeacb92d81bf88b4b57e53 to your computer and use it in GitHub Desktop.
generate random text with javascript
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
var text = ""; | |
var alphabet = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,r,s,t,u,v,w,x,y,z".split(","); | |
var wordCount = 256; | |
for(var i=0; i<wordCount; i++) { | |
var rand = null; | |
for (var x=0; x<7; x++) { | |
rand = Math.floor(Math.random() * alphabet.length); | |
text += alphabet[rand]; | |
} | |
if (i<wordCount-1) | |
text += " "; | |
else | |
text += "."; | |
} | |
console.info("text length = " + text.length); | |
console.info(text); |
great that what i needed
Poop
Poop
?? 🤣
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow man this code is what i search about. Thank You !!!