Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
213 views

Randomly set styles with JavaScript

I have created a function which randomly sets styles using CSS selectors. Right now it returns a random item from an array. The program also works with shorthand properties (such as ...
Gibberish's user avatar
  • 109
4 votes
1 answer
225 views

Displaying Media with HTML and JavaScript

I have a personal website that I use to share videos and images with friends. Below is a media generator using JavaScript and HTML. Its main purpose is to display one image at a time at the click of a ...
user avatar
6 votes
2 answers
374 views

Random quote rotator

On my website, I created like this banner that rotates quotes from an array I made. ...
Black Jesus's user avatar
1 vote
1 answer
697 views

Random winner selector

I am looking to improve and simplify the way I code. What is the best way to represent this: ...
AKLD321's user avatar
  • 21
3 votes
2 answers
3k views

Generating random numbers and decks of cards

So I have some code here: First a simple random # generator and a array-choosing function: ...
Malachi Wadas's user avatar
3 votes
1 answer
283 views

Retrieve random element from array not contained in second array

I have a function, getUnusedName that returns a random name, but first checks if it's already used by any object within a second array. Observing how many times ...
rmorrin's user avatar
  • 185
4 votes
1 answer
226 views

Von Neumann extractor to remove bias from pseudorandom array

Von Neumann extraction is a technique to remove bias from a source of entropy. You extract an unbiased array of bits from a biased one by comparing pairs of consecutive bits in the array and returning ...
Thriggle's user avatar
  • 1,318