{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/6513","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/6513/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/6513/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/6513/events","html_url":"https://github.com/nodejs/node/issues/6513","id":152478626,"number":6513,"title":"Arrow function, Comma operator, and recursion pattern bug","user":{"login":"its2mc","id":5119061,"avatar_url":"https://avatars.githubusercontent.com/u/5119061?v=3","gravatar_id":"","url":"https://api.github.com/users/its2mc","html_url":"https://github.com/its2mc","followers_url":"https://api.github.com/users/its2mc/followers","following_url":"https://api.github.com/users/its2mc/following{/other_user}","gists_url":"https://api.github.com/users/its2mc/gists{/gist_id}","starred_url":"https://api.github.com/users/its2mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/its2mc/subscriptions","organizations_url":"https://api.github.com/users/its2mc/orgs","repos_url":"https://api.github.com/users/its2mc/repos","events_url":"https://api.github.com/users/its2mc/events{/privacy}","received_events_url":"https://api.github.com/users/its2mc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/nodejs/node/labels/repl","name":"repl","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-05-02T04:08:46Z","updated_at":"2016-05-02T04:19:03Z","closed_at":"2016-05-02T04:15:56Z","body":"* **v 6.0.0**:\r\n* **win64**:\r\n\r\n<!-- Investigating weird recursive patterns. -->\r\n\r\nHey I was playing around with arrow functions, comma operators and recursive patterns when I noticed a weird bug, if I run this code as node interactive, I get the following result.\r\n<h3>CODE</h3>\r\nvar d = (x) => (console.log(++x),\r\n\t(global.d = (x) => (console.log(--x),\r\n\t\t(global.d = (x) => (console.log(x+=2),\r\n\t\t\t(global.d =(x) => (console.log(x-=2)))\r\n\t\t))\r\n\t))\r\n);\r\n\r\n<h3>Node interactive result</h3>\r\n![image](https://cloud.githubusercontent.com/assets/5119061/14946964/2db87136-1066-11e6-8dcc-f4f3f167efa0.png)\r\n\r\nHowever, when I run the command node code.js I get the following result\r\n<h3>code.js</h3>\r\n![image](https://cloud.githubusercontent.com/assets/5119061/14946973/56588432-1066-11e6-92f2-c9cf95ee3e1e.png)\r\n<h3>result</h3>\r\n![image](https://cloud.githubusercontent.com/assets/5119061/14946977/62dfa988-1066-11e6-8271-d50a1d7d7276.png)\r\nI am trying to figure out why this is so.. Could it be that I am only able to modify a global child while in interactive mode? What could be the reason for this.\r\n\r\nThe pattern I am using may be useful as an execute once and change pattern, You could add self recursion to it too i guess. If you know a more efficient way of doing this please let me know.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/216102710","html_url":"https://github.com/nodejs/node/issues/6513#issuecomment-216102710","issue_url":"https://api.github.com/repos/nodejs/node/issues/6513","id":216102710,"user":{"login":"its2mc","id":5119061,"avatar_url":"https://avatars.githubusercontent.com/u/5119061?v=3","gravatar_id":"","url":"https://api.github.com/users/its2mc","html_url":"https://github.com/its2mc","followers_url":"https://api.github.com/users/its2mc/followers","following_url":"https://api.github.com/users/its2mc/following{/other_user}","gists_url":"https://api.github.com/users/its2mc/gists{/gist_id}","starred_url":"https://api.github.com/users/its2mc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/its2mc/subscriptions","organizations_url":"https://api.github.com/users/its2mc/orgs","repos_url":"https://api.github.com/users/its2mc/repos","events_url":"https://api.github.com/users/its2mc/events{/privacy}","received_events_url":"https://api.github.com/users/its2mc/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T04:19:03Z","updated_at":"2016-05-02T04:19:03Z","body":"thanks."}}