{"action":"created","issue":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14067","repository_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp","labels_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14067/labels{/name}","comments_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14067/comments","events_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14067/events","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/issues/14067","id":216513782,"number":14067,"title":"Sum All Prime , I have the good results, but the test don't succeed","user":{"login":"kaloudiyi","id":20405854,"avatar_url":"https://avatars2.githubusercontent.com/u/20405854?v=3","gravatar_id":"","url":"https://api.github.com/users/kaloudiyi","html_url":"https://github.com/kaloudiyi","followers_url":"https://api.github.com/users/kaloudiyi/followers","following_url":"https://api.github.com/users/kaloudiyi/following{/other_user}","gists_url":"https://api.github.com/users/kaloudiyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaloudiyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaloudiyi/subscriptions","organizations_url":"https://api.github.com/users/kaloudiyi/orgs","repos_url":"https://api.github.com/users/kaloudiyi/repos","events_url":"https://api.github.com/users/kaloudiyi/events{/privacy}","received_events_url":"https://api.github.com/users/kaloudiyi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-23T17:39:40Z","updated_at":"2017-03-23T20:14:44Z","closed_at":"2017-03-23T20:14:44Z","body":"Challenge [Sum All Primes](https://www.freecodecamp.com/challenges/sum-all-primes#?solution=%0Afunction%20isPrime(n)%20%7B%0A%20%20%20%20for(var%20j%3D2%3Bj%3Cn%3Bj%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20if((n%20%25%20j)%20%3D%3D%3D%200)%0A%20%20%20%20%20%20%20%20return(false)%3B%0A%20%20%20%20%7D%0A%20%20%20%20return(true)%3B%0A%7D%0A%0Avar%20sum%3D0%3B%0Afunction%20sumPrimes(num)%20%7B%0A%20%20for(var%20i%3D2%3B%20i%3C%3Dnum%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20if(isPrime(i))%20sum%2B%3Di%3B%20%20%20%20%20%20%0A%20%20%7D%0A%20%20return%20sum%3B%0A%7D%0A%0AsumPrimes(10)%3B%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8</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\n\r\nfunction isPrime(n) {\r\n    for(var j=2;j<n;j++) {\r\n        if((n % j) === 0)\r\n        return(false);\r\n    }\r\n    return(true);\r\n}\r\n\r\nvar sum=0;\r\nfunction sumPrimes(num) {\r\n  for(var i=2; i<=num; i++) {\r\n      if(isPrime(i)) sum+=i;      \r\n  }\r\n  return sum;\r\n}\r\n\r\nsumPrimes(10);\r\n\r\n```\r\nI tried that code outside the free code camp editor and checked the results. The results are correct."},"comment":{"url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/comments/288846425","html_url":"https://github.com/freeCodeCamp/freeCodeCamp/issues/14067#issuecomment-288846425","issue_url":"https://api.github.com/repos/freeCodeCamp/freeCodeCamp/issues/14067","id":288846425,"user":{"login":"kaloudiyi","id":20405854,"avatar_url":"https://avatars2.githubusercontent.com/u/20405854?v=3","gravatar_id":"","url":"https://api.github.com/users/kaloudiyi","html_url":"https://github.com/kaloudiyi","followers_url":"https://api.github.com/users/kaloudiyi/followers","following_url":"https://api.github.com/users/kaloudiyi/following{/other_user}","gists_url":"https://api.github.com/users/kaloudiyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaloudiyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaloudiyi/subscriptions","organizations_url":"https://api.github.com/users/kaloudiyi/orgs","repos_url":"https://api.github.com/users/kaloudiyi/repos","events_url":"https://api.github.com/users/kaloudiyi/events{/privacy}","received_events_url":"https://api.github.com/users/kaloudiyi/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T20:14:44Z","updated_at":"2017-03-23T20:14:44Z","body":"Your absolutely right. I forgot to declare and misplaced the reset of sum which should be inside the function. Thank you very much :-) "}}
{"actor":{"display_login":"kaloudiyi"}}