break loop timeout javascript

Solutions on MaxInterview for break loop timeout javascript by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "break loop timeout javascript"
Logan
14 Jan 2018
1var keepCalling = true;
2
3setTimeout(function () {
4  keepCalling = false;
5}, 10000);
6
7while ( keepCalling ) {
8  // do something
9}