/    Sign up×
Community /Pin to ProfileBookmark

need help with random text!

I would like to have a feature that takes quotations and scrambles the text to create new quotations. I want it to happen continuously, not just when a user enters the page. Here’s an example:

Better sound through research

It¹s better with bacon

Better bacon through perfection

I love what you do for me

The relentless pursuit of perfection

I love bacon

It’s love

The sound of bacon

Bacon is perfection

Love is perfection

Any help is much appreciated!

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@pyroJan 07.2003 — What exactly do you want to do? Do you want to take pre-defined quotes and display them randomly to you page?? Maybe you could explain better...
Copy linkTweet thisAlerts:
@kalamataauthorJan 07.2003 — I want to take pre-defined quotes, scramble the words, and display the variations on a continuously revolving basis.

So "Better sound through research"

and "It's better with bacon"

become... "Better bacon through research", etc.
Copy linkTweet thisAlerts:
@pyroJan 07.2003 — You could randomize the words, but you may end up with something like this

"It's sound through with"

or

"Better better with through"

Know what I mean? If you just randomize the words, what's to say that they'll be sentences when you are done?
Copy linkTweet thisAlerts:
@kalamataauthorJan 07.2003 — I was thinking that too...

Maybe I could have a set list of rotating subject, verbs, objects?

Any suggestions?
Copy linkTweet thisAlerts:
@pyroJan 07.2003 — Yes, you could have a list of rotating subjects, verbs, and objects...Just make sure everything sounds good with everything. ?
×

Success!

Help @kalamata spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...