snipt

Ctrl+h for KB shortcuts

JavaScript

The winner of the Snipt.net AEA Boston ticket giveaway...

$('div.account').eq(Math.floor(Math.random()*312)).data('screen-name')
=> "toddbudnikas"
https://snipt.net/embed/fbab640dc0577be1e30c3330ef0c3997/
/raw/fbab640dc0577be1e30c3330ef0c3997/
fbab640dc0577be1e30c3330ef0c3997
js
JavaScript
2
2019-06-09T03:35:56
True
False
False
/api/public/snipt/38894/
the-winner-of-the-sniptnet-aea-boston-ticket-giveaway
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;div.account&#39;</span><span class="p">).</span><span class="nx">eq</span><span class="p">(</span><span class="nb">Math</span><span class="p">.</span><span class="nx">floor</span><span class="p">(</span><span class="nb">Math</span><span class="p">.</span><span class="nx">random</span><span class="p">()</span><span class="o">*</span><span class="mi">312</span><span class="p">)).</span><span class="nx">data</span><span class="p">(</span><span class="s1">&#39;screen-name&#39;</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a><span class="o">=&gt;</span> <span class="s2">&quot;toddbudnikas&quot;</span> </span></pre></div> </td></tr></table>
aea, snipt