Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.






                import seedrandom from "";

//Enter the drawing seed here, and then check the console to see the list of numbers output. Make sure you keep the quotation marks!
const DRAWING_SEED = "9e8aecefc9e15ed36f230ff5d7aa49b64ddbaf78f99f4a819f7e2a5037efe028d1d549baf571b9ac36358115e3811843b7e19633c998797ec9075ed528ef71cf"

//Fisher-Yates shuffle
function fyShuffle(array: number[], rng: () => number) {
  let i = array.length
  let j = 0
  let temp

  while (i--) {
    j = Math.floor(rng() * (i + 1))

    temp = array[i]
    array[i] = array[j]
    array[j] = temp

  return array

//All numbers that can be drawn in a normal Prizeray drawing.
const NUMBER_SET = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]

//Takes the amount of numbers we want to draw (5) and the random number generator, seeded with the DRAWING_SEED.
function chooseNumbers(amount: number, rng: () => number) {
  const shuffled = fyShuffle(NUMBER_SET, rng).slice(0, amount)
  return shuffled

//Create the random number generator, trim any excess whitespace on either side
const csprng = seedrandom(DRAWING_SEED.trim())

console.log(`This draw's winning numbers are: ${chooseNumbers(5, csprng).toString()}`)