"Weighted Random" is a function that randomly returns an item from a list of items. It takes each item's weight into account so that items with the higher weight will be picked more often.
Companies Mentioned
Oleksii Trekhleb
@trekhleb
Software Engineer @ UBER. Author of the 100k โญ๏ธ javascript-algorithms repository on GitHub.