randomizing pro gallery each time

I am using pro gallery and I want show random image in each refreshing , I use this code to randomizing gallery but… it des not show the answer … i dont know nothing about coding…

$w.onReady(function () {$w("#dataset1").onReady(() => {let items = $w("#gallery1").items;
       items = shuffle(items);$w("#gallery1").items = items;});});export function shuffle(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]];}return array;}