Counter in vew

Hi,
Can someone help me with this code? I want these three text elements to start counting in vew, and right now they are starting with the page load.

Thanks

export function text60_viewportEnter(event) {
//Add your code for this event here:
}
let startNum = 0;
let endNum = 37;
const duration = 600;

setInterval(()=> { 
    countUp();   
}, duration); 

function countUp(){
if (startNum <= endNum ){
$w(‘#text60’).text = startNum.toString();
startNum++;
}
}

let startNum1 = 0;
let endNum1 = 4;
const duration1 = 4000;

$w.onReady( function () {
setInterval(()=> {
countUp1();
}, duration1);
});

function countUp1(){
if (startNum1 <= endNum1 ){
$w(‘#text62’).text = startNum1.toString();
startNum1++;
}
}

let startNum2 = 0;
let endNum2 = 191;
const duration2 = 150;

$w.onReady( function () {
setInterval(()=> {
countUp2();
}, duration2);
});

function countUp2(){
if (startNum2 <= endNum2 ){
$w(‘#text64’).text = startNum2.toString();
startNum2++;
}
}

export function text64_viewportEnter(event) {
//Add your code for this event here:
}

export function text62_viewportEnter(event) {
//Add your code for this event here:
}

export function column15_viewportEnter(event) {
//Add your code for this event here:
}