Lottery (pure JS)