16
rated 0 times
[
22]
[
6]
/ answers: 1 / hits: 16572
/ 7 Years ago, sun, october 8, 2017, 12:00:00
I would like to continuously call the function below using setInterval()
but only if the condition in the if statement evaluates to true.
Note: The function is global.
function view_stack(){
if(my_stack.size() > 0){
document.getElementById(stack_visual).innerHTML = my_stack.view();
} else {
swal(Ohhhh Noes, There are no items in the stack!, error);
}
}
Is there a way I can achieve it?
More From » jquery