js的function中如何循环显示?

画图园的js中有个function,要text进去参数,然后显示出来。

代码大概是这样的

function drawValue() {
        ctx.save();
        ctx.translate(110, 165);
        ctx.textAlign = 'center';
        ctx.font = '16px MicrosoftYaHei';

            ctx.fillStyle = '#5bb4ff';
            ctx.fillText(incurValue, 0, 0); 

            ctx.fillStyle = '#29dcfc';
            ctx.fillText(outcurValue, 0, 0);    

                    ctx.restore()
}

就那两个text要轮流显示出来。 请问各位大神怎么弄?
我试了settimeout和setInterval,不知道是不是我写错了,总是跑不进这连个set方法中。。。。

这个图是用CV画的 , canvas的fillText

setTimeout(function(){
drawValue();
setTimeout(arguments.callee,1000);
},1000);
setInterval(drawValue, 1000);

let boo=true
setInterval(drawValue, 1000);
function drawValue() {
        ctx.save();
        ctx.translate(110, 165);
        ctx.textAlign = 'center';
        ctx.font = '16px MicrosoftYaHei';
                if(boo){
                 ctx.fillStyle = '#5bb4ff';
           ctx.fillText(incurValue, 0, 0); 
                    boo=false
                }else{
                 ctx.fillStyle = '#29dcfc';
           ctx.fillText(outcurValue, 0, 0);   
                    boo=true
                }
        ctx.restore()
}