break loop timeout javascript

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

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}