How to use random and the split function together in JavaScript?
<p>This function is supposed to output random characters with commas, but there is no output   </p>

<pre><code>&lt;p id="demo"&gt;Click the button to display a random number.&lt;/p&gt;

&lt;button onclick="myFunction()"&gt;Submit&lt;/button&gt;

&lt;script&gt;
function myFunction()
{
var random_list = randomizeList([1,2,3,4,49,'foo',38,'bar',9,-1]);
var n=random_list.split(" ");
document.getElementById("demo").innerHTML=n;
}
&lt;/script&gt;
</code></pre>
