<h2>JavaScript Dizi Sıralama</h2> <button onclick="siralama()">Rasgele Sırala</button> <p id="demo"></p> <script> var sayilar = [25, 9, 12, 33, 87, 1, 42]; document.getElementById("demo").innerHTML = sayilar; function siralama() { sayilar.sort(function(a, b){return 0.5 - Math.random()}); document.getElementById("demo").innerHTML = sayilar; } </script>