Help for javascript to random this list:
How to randomize a list browser onload?
<ul id="list">
<li>1.Italy</li>
<li>2.Stockholm</li>
<li>3.Helsinki</li>
<li>4.Berlin</li>
<li>5.Rome</li>
<li>6.Madrid</li>
</ul>
The same system of this array:
<p id="demo"></p>
<script>
const points = [40, 100, 1, 5, 25, 10];
document.getElementById("demo").innerHTML = points;
function myFunction() {
for (let i = points.length -1; i > 0; i--) {
let j = Math.floor(Math.random() * i)
let k = points[i]
points[i] = points[j]
points[j] = k
}
document.getElementById("demo").innerHTML = points;
}
window.onload = myFunction;
</script>