{"action":"closed","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7965","repository_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7965/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7965/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7965/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/7965","id":146750261,"number":7965,"title":"Getting the correct results, tests not passing, not sure why","user":{"login":"kristenmthayer","id":15021800,"avatar_url":"https://avatars.githubusercontent.com/u/15021800?v=3","gravatar_id":"","url":"https://api.github.com/users/kristenmthayer","html_url":"https://github.com/kristenmthayer","followers_url":"https://api.github.com/users/kristenmthayer/followers","following_url":"https://api.github.com/users/kristenmthayer/following{/other_user}","gists_url":"https://api.github.com/users/kristenmthayer/gists{/gist_id}","starred_url":"https://api.github.com/users/kristenmthayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristenmthayer/subscriptions","organizations_url":"https://api.github.com/users/kristenmthayer/orgs","repos_url":"https://api.github.com/users/kristenmthayer/repos","events_url":"https://api.github.com/users/kristenmthayer/events{/privacy}","received_events_url":"https://api.github.com/users/kristenmthayer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T21:42:48Z","updated_at":"2016-04-07T21:54:46Z","closed_at":"2016-04-07T21:54:46Z","body":"Challenge [Pig Latin](https://www.freecodecamp.com/challenges/pig-latin#?solution=function%20translate(str)%20%7B%0A%20%20var%20firstLetter%20%3D%20str.charAt(0)%3B%0A%20%20var%20secondLetter%20%3D%20str.charAt(1)%3B%0A%20%20if%20(str.charAt(0)%3D%3D%3D%22a%22%7C%7Cstr.charAt(0)%3D%3D%3D%22e%22%7C%7Cstr.charAt(0)%3D%3D%3D%22i%22%20%7C%7C%20str.charAt(0)%3D%3D%3D%22o%22%7C%7Cstr.charAt(0)%3D%3D%3D%22u%22)%7B%0A%20%20%20%20str%20%2B%3D%20%22way%22%3B%0A%20%20%7D%0A%20%20else%20if%20(str.charAt(1)%3D%3D%3D%22a%22%7C%7Cstr.charAt(1)%3D%3D%3D%22e%22%7C%7Cstr.charAt(1)%3D%3D%3D%22i%22%20%7C%7C%20str.charAt(1)%3D%3D%3D%22o%22%7C%7Cstr.charAt(1)%3D%3D%3D%22u%22)%7B%0A%20%20%20%20str%20%3D%20str.slice(1)%3B%0A%20%20%20%20str%20%2B%3D%20firstLetter%20%2B%20%22ay%22%3B%0A%20%20%7D%0A%20%20%0A%20%20else%20%7B%0A%20%20%20%20str%20%3D%20str.slice(2)%3B%0A%20%20%20%20str%20%2B%3D%20firstLetter%20%2B%20secondLetter%20%2B%20%22ay%22%3B%0A%20%20%7D%0A%20%20%0A%20%20return%20str%3B%0A%7D%0A%0Atranslate(%22paragraphs%22)%3B%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36</code>.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nYou can see in the screenshot that the word logged in the console is correct, but the tests aren't passing.\r\n<img width=\"923\" alt=\"piglatin\" src=\"https://cloud.githubusercontent.com/assets/15021800/14367795/eb054760-fcce-11e5-8b43-f12744a15342.PNG\">\r\n\r\n\r\nMy code:\r\n```javascript\r\nfunction translate(str) {\r\n  var firstLetter = str.charAt(0);\r\n  var secondLetter = str.charAt(1);\r\n  if (str.charAt(0)===\"a\"||str.charAt(0)===\"e\"||str.charAt(0)===\"i\" || str.charAt(0)===\"o\"||str.charAt(0)===\"u\"){\r\n    str += \"way\";\r\n  }\r\n  else if (str.charAt(1)===\"a\"||str.charAt(1)===\"e\"||str.charAt(1)===\"i\" || str.charAt(1)===\"o\"||str.charAt(1)===\"u\"){\r\n    str = str.slice(1);\r\n    str += firstLetter + \"ay\";\r\n  }\r\n  \r\n  else {\r\n    str = str.slice(2);\r\n    str += firstLetter + secondLetter + \"ay\";\r\n  }\r\n  \r\n  return str;\r\n}\r\n\r\ntranslate(\"paragraphs\");\r\n\r\n```\r\n\r\n"}}