loading...

re: What is the oddest JavaScript behavior? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I'm guessing a web app won't need a 25-day timeout or interval. I tried a very basic test on node and it seems to be waiting on it to execute... a...
 

not sure... i just ran it in node and experienced the same issue as the browser. The following line should make node print without pausing:

setInterval(() => {console.log('log')}, 2**31)

or

setInterval(() => {console.log('log')}, -1)

where the following will take 596.5 hours (roughly):

setInterval(() => {console.log('log')}, 2**31-1)

I am currently on a Windows machine running v8.9.1, perhaps its solved in later versions?

Code of Conduct Report abuse