how to get Variable Repeater

Hi,
how do I put repeater value in a variable and call it.

let menutestrepeater = $w ( ‘#mainmenuRepeater’ );

call here:
menutestrepeater.data = menusData.mainmenu ;

Error:
error TypeError: repeaterSelector.onItemReady is not a function