Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142129

Execute next statement in While loop after recursion

$
0
0

I have function like below

function add(){
var isOk = true;

  while(isOk){
   add();         // calling my function again here based on some condition
   console.log('I can\'t reach this line');
   isOk = false;
  } 
}
add()  // calling function here

Now when i call my add function, is there a way i can reach my console.log statement here ?


Viewing all articles
Browse latest Browse all 142129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>