{"action":"created","issue":{"url":"https://api.github.com/repos/ikrum/potaka/issues/5","repository_url":"https://api.github.com/repos/ikrum/potaka","labels_url":"https://api.github.com/repos/ikrum/potaka/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/ikrum/potaka/issues/5/comments","events_url":"https://api.github.com/repos/ikrum/potaka/issues/5/events","html_url":"https://github.com/ikrum/potaka/issues/5","id":172376024,"number":5,"title":"Exception handling for infinite loop","user":{"login":"Ysajid","id":15795188,"avatar_url":"https://avatars.githubusercontent.com/u/15795188?v=3","gravatar_id":"","url":"https://api.github.com/users/Ysajid","html_url":"https://github.com/Ysajid","followers_url":"https://api.github.com/users/Ysajid/followers","following_url":"https://api.github.com/users/Ysajid/following{/other_user}","gists_url":"https://api.github.com/users/Ysajid/gists{/gist_id}","starred_url":"https://api.github.com/users/Ysajid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ysajid/subscriptions","organizations_url":"https://api.github.com/users/Ysajid/orgs","repos_url":"https://api.github.com/users/Ysajid/repos","events_url":"https://api.github.com/users/Ysajid/events{/privacy}","received_events_url":"https://api.github.com/users/Ysajid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-22T06:10:44Z","updated_at":"2016-08-25T18:14:31Z","closed_at":"2016-08-22T06:33:03Z","body":"লুপ( অসীম বার) {\r\n  দেখাও(\"ঘুরছে\")\r\n}\r\n\r\nif this code is run the browser freezes and gives a prompt to stop the script"},"comment":{"url":"https://api.github.com/repos/ikrum/potaka/issues/comments/242488435","html_url":"https://github.com/ikrum/potaka/issues/5#issuecomment-242488435","issue_url":"https://api.github.com/repos/ikrum/potaka/issues/5","id":242488435,"user":{"login":"dhrubomoy","id":12648587,"avatar_url":"https://avatars.githubusercontent.com/u/12648587?v=3","gravatar_id":"","url":"https://api.github.com/users/dhrubomoy","html_url":"https://github.com/dhrubomoy","followers_url":"https://api.github.com/users/dhrubomoy/followers","following_url":"https://api.github.com/users/dhrubomoy/following{/other_user}","gists_url":"https://api.github.com/users/dhrubomoy/gists{/gist_id}","starred_url":"https://api.github.com/users/dhrubomoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhrubomoy/subscriptions","organizations_url":"https://api.github.com/users/dhrubomoy/orgs","repos_url":"https://api.github.com/users/dhrubomoy/repos","events_url":"https://api.github.com/users/dhrubomoy/events{/privacy}","received_events_url":"https://api.github.com/users/dhrubomoy/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T18:14:31Z","updated_at":"2016-08-25T18:14:31Z","body":"@Ysajid Interesting point. I am not sure if this is going to be helpful but, with my very limited knowledge in Javascript, I think it is single threaded meaning that one thread handles your event loop. I am not sure if you can stop an infinite loop after its execution starts. If you try similar infinite loop written in javascript, in other online javascript compiler (such as [JSFiddle](https://jsfiddle.net/), [js.do](https://js.do/) etc.) your browser will freeze just like it does with [potaka.io](potaka.io) .  For example. try this example: [http://js.do/code/106546](http://js.do/code/106546)\r\nAlso noticed something in the debugger (in SCRIPT0:2) after running your code in potaka.io :\r\n```\r\nfor (let _ইন্ডেক্স = 1; _ইন্ডেক্স <= 1e+400; _ইন্ডেক্স++) {\r\n    দেখাও('\\u0998\\u09c1\\u09b0\\u099b\\u09c7');\r\n}\r\n```\r\nI guess we could change the default 1e+400 to some number so that the browser does not freeze. But we definitely should NOT implement that. Not an option  :cat: \r\nAlso take a look at [this stackoverflow question](http://stackoverflow.com/questions/39151340/how-to-stop-executing-javascript-function-containing-infinite-loop-after-some-ti) I posted and its answers. Might give you some clue.\r\nGood luck figuring out the solution. It will be a cool feature. :smiley_cat: "}}
{"actor":{"display_login":"dhrubomoy"}}