Random Text on Refresh?

 const splash = [
 '123',
 '222',
 '31',
 '213'
];

$w.onReady(function(){
 const text = Math.floor(Math.random() * (splash.length - 1));
•'splash' does not exist in '#splashText'•    $w('#splashText').splash = splash[text];
});

i use this code but it isn’t work gives error

Anyone can help?

Hello.
The error says that $w(’ #splashText ‘) doesn’t have attribute splash. Use $w(’ #splashText ').text instead.

it’s worked
thanks a lot