Mas Koding
/

script mengacak posisi array

Mas Koding
Desember 25, 2023


function shuffleArray(array) {
    for (let i = array.length - 1; i > 0; i--) {
        const j = Math.floor(Math.random() * (i + 1));
        [array[i], array[j]] = [array[j], array[i]];
    };
};


Share Article

Spread the word

0 Komentar

Mas Koding

Sharing knowledge about technology, programming tutorials, and the latest web development trends. Built for developers by developers.

Discover

© 2025 Mas Koding. Crafted with h.

System Operational