How do I randomly apply CSS style using plain Javascript? : <p>I have a few list entries that I would like to randomly highlight, 1 item only with different background and text color.</p>

<p>As shown below with "list 2" highlighted.</p>

<pre><code>&lt;div id="entries"&gt;
    &lt;ul style="list-style-type: none;"&gt;
        &lt;li&gt;&lt;a href="#1"&gt;list 1&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#2" style="color:#fff; background-color:#000"&gt;list 2&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#3"&gt;list 3&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#4"&gt;list 4&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#5"&gt;list 5&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>How can I achieve this using vanilla javascript without the use of jQuery?</p>
