1setInterval(function(){
2 console.log("Oooo Yeaaa!");
3}, 2000);//run this thang every 2 seconds
1function func(){
2 console.log("Ran")
3}
4setInterval(func,1000)//Runs the "func" function every second
1loadingProgress(max, jump, speed) {
2 const loadBar = setInterval(() => {
3 if(this.load_current < max){
4 this.load_current += jump || 1;
5 } else {
6 clearInterval(loadBar);
7 this.onOk()
8 if(this.isFrom == 'isReject') {
9 this.$emit('loadRejectErros');
10 }
11 }
12 }, speed);
13},
1setInterval(function(){
2 console.log("Hello");
3 console.log("World");
4}, 2000); //repeat every 2s
1setInterval(function(){
2 console.log("print this once every 3 second");
3}, 3000);//run this thang every 3 seconds