JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<button id="do_the_magic">Find en vinder</button>
<div id="output"></div>

JavaScript

var tables = {
  'A': 28,
  'B': 24,
  'C': 28,
  'D': 32,
  'E': 32,
  'F': 32,
  'G': 32
}

$(function(){
	$("#do_the_magic").click(function(){
  	var keys = Object.keys(tables);
    var table = keys[Math.floor(keys.length * Math.random())];
    var seats = tables[table];
    var seat = Math.floor(Math.random() * seats) + 1;
		var winner = table + '-' + seat;
    $("#output").text(winner);
  });
});