{"action":"created","issue":{"url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/134","repository_url":"https://api.github.com/repos/huluoyang/freecodecamp.cn","labels_url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/134/comments","events_url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/134/events","html_url":"https://github.com/huluoyang/freecodecamp.cn/issues/134","id":166819751,"number":134,"title":"issue report!","user":{"login":"LanceLou","id":15168516,"avatar_url":"https://avatars.githubusercontent.com/u/15168516?v=3","gravatar_id":"","url":"https://api.github.com/users/LanceLou","html_url":"https://github.com/LanceLou","followers_url":"https://api.github.com/users/LanceLou/followers","following_url":"https://api.github.com/users/LanceLou/following{/other_user}","gists_url":"https://api.github.com/users/LanceLou/gists{/gist_id}","starred_url":"https://api.github.com/users/LanceLou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LanceLou/subscriptions","organizations_url":"https://api.github.com/users/LanceLou/orgs","repos_url":"https://api.github.com/users/LanceLou/repos","events_url":"https://api.github.com/users/LanceLou/events{/privacy}","received_events_url":"https://api.github.com/users/LanceLou/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-21T13:30:41Z","updated_at":"2016-07-27T03:26:23Z","closed_at":"2016-07-26T01:27:44Z","body":"Challenge [No repeats please](https://www.freecodecamp.cn/challenges/no-repeats-please#?solution=var%20num%20%3D%200%3B%0Afunction%20permAlone(str)%20%7B%0A%20%20permutate(str.split(%22%22)%2C0%2Ccallback)%3B%0A%20%20return%20num%3B%0A%7D%0Afunction%20swap(arr%2Ci%2Cj)%7B%0A%20%20var%20temp%3B%0A%20%20temp%20%3D%20arr%5Bi%5D%3B%0A%20%20arr%5Bi%5D%20%3D%20arr%5Bj%5D%3B%0A%20%20arr%5Bj%5D%20%3D%20temp%3B%0A%7D%0Afunction%20permutate(listArr%2Cstart%2Ccallback)%7B%0A%20%20var%20i%2C%20length%20%3D%20listArr.length%3B%0A%20%20if%20(start%20%3D%3D%3D%20listArr.length-1)%0A%20%20%20%20%20%20callback(listArr)%3B%0A%20%20else%7B%0A%20%20%20%20%20%20for(i%20%3D%20start%3B%20i%20%3C%20length%3B%20i%2B%2B)%7B%0A%20%20%20%20%20%20%20%20%20%20swap(listArr%2Cstart%2Ci)%3B%0A%20%20%20%20%20%20%20%20%20%20permutate(listArr%2Cstart%2B1%2Ccallback)%3B%0A%20%20%20%20%20%20%20%20%20%20swap(listArr%2Ci%2Cstart)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%7D%0A%7D%0Afunction%20callback(arr)%7B%0A%20%20if(arr.join(%22%22).match(%2F(.)%5C1%2F)%20%3D%3D%3D%20null)%0A%20%20%20%20num%2B%2B%3B%0A%7D%0ApermAlone(%22aabb%22)%3B%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36</code>.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nMy code:\r\n```javascript\r\nvar num = 0;\r\nfunction permAlone(str) {\r\n  permutate(str.split(\"\"),0,callback);\r\n  return num;\r\n}\r\nfunction swap(arr,i,j){\r\n  var temp;\r\n  temp = arr[i];\r\n  arr[i] = arr[j];\r\n  arr[j] = temp;\r\n}\r\nfunction permutate(listArr,start,callback){\r\n  var i, length = listArr.length;\r\n  if (start === listArr.length-1)\r\n      callback(listArr);\r\n  else{\r\n      for(i = start; i < length; i++){\r\n          swap(listArr,start,i);\r\n          permutate(listArr,start+1,callback);\r\n          swap(listArr,i,start);\r\n      }\r\n  }\r\n}\r\nfunction callback(arr){\r\n  if(arr.join(\"\").match(/(.)\\1/) === null)\r\n    num++;\r\n}\r\npermAlone(\"aabb\");\r\n\r\n```\r\n\r\nThe issue is when I get the right value and return it, the system tell me that I not pass it."},"comment":{"url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/comments/235474447","html_url":"https://github.com/huluoyang/freecodecamp.cn/issues/134#issuecomment-235474447","issue_url":"https://api.github.com/repos/huluoyang/freecodecamp.cn/issues/134","id":235474447,"user":{"login":"LanceLou","id":15168516,"avatar_url":"https://avatars.githubusercontent.com/u/15168516?v=3","gravatar_id":"","url":"https://api.github.com/users/LanceLou","html_url":"https://github.com/LanceLou","followers_url":"https://api.github.com/users/LanceLou/followers","following_url":"https://api.github.com/users/LanceLou/following{/other_user}","gists_url":"https://api.github.com/users/LanceLou/gists{/gist_id}","starred_url":"https://api.github.com/users/LanceLou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LanceLou/subscriptions","organizations_url":"https://api.github.com/users/LanceLou/orgs","repos_url":"https://api.github.com/users/LanceLou/repos","events_url":"https://api.github.com/users/LanceLou/events{/privacy}","received_events_url":"https://api.github.com/users/LanceLou/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T03:26:23Z","updated_at":"2016-07-27T03:26:23Z","body":"嗯嗯   谢谢各位了"}}
{"actor":{"display_login":"LanceLou"}}