please add another version of the code as given below:
let startNum1 = 123
let endNum1 = 789
const duration1 = 100;
$w.onReady(function () {
});
function countUp1() {
if (startNum1 <= endNum1 ){
$w('#text28').text = startNum1.toString(); //id of your text element
startNum1++;
}
}
export function text28_viewportEnter(event, $w) {
setInterval(()=> {
countUp1();
}, duration1);
}