My code is bellow, it doesn't throw errors but it stops after running ones.
I tried reviewing this codes and searching through documentation, but couldn't find anything, possibly due to my level of knowledge.
var timeNumbers = ['count','working','resting'];
var amountData = {'count':0,'working':0,'resting':0};
function fromCount(){
if(timeVa['working'] == false) return;
var amountDataNo1 = Array.from(amountData);
var dataW = setInterval(loseTimeW(1),1000);
function loseTimeW(n){
if(amountDataNo1[timeNumbers[n]] == 0){
clearInterval(dataW);
timeVa['resting'] == true;
}else{
amountDataNo1[timeNumbers[n]]--;
}
}
}