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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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.






                (async () => {
  //The First block hash after 22 May 2021 00:00:00 UTC time
  const hash = "000000000000000000092eff541d676fe2732f9358643f0c821db9a5fad5c530";

  //List of all tickets from YouHodler
  const tickets = await axios
    .then(res =>;

  const fullTicketsList = tickets.reduce((t, user) => {
    for (let i = 0; i <; i++) t.push(;
    return t;
  }, []);

  //count of all tickets
  const ticketsCount = fullTicketsList.length;

  //last 8 symbols of hash convert to int32
  const partOfHash = parseInt(hash.slice(-8), 16);

  //remainder of the division
  const winLine = partOfHash % ticketsCount;

  console.log(winLine, fullTicketsList[winLine]);

  $('h1').html(`Winner ID: ${fullTicketsList[winLine]}`)
  $('h2').html(`Win line: ${winLine}`)