$w.onReady( function () {
//TODO: write your page related code here…
});
import wixData from ‘wix-data’ ;
$w.onReady( async function () {
$w( "#repeater1" ).onItemReady(($item, itemData, index) => {
$item( '#title' ).text = itemData.title;
$item( '#number' ).text = "" + itemData.num;
});
let results = await wixData.query( “MYPRODECT” ).find();
let items = results.items;
console.log(items); // take a peek at the items
let shuffled = shuffleArray(items);
console.log(shuffled); // now see the shuffled array
$w( '#repeater1' ).data = shuffled;
$w( '#repeater1' ).expand();
});