{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/8879","repository_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/8879/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/8879/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/8879/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/8879","id":157774905,"number":8879,"title":"Test case error: Confirm the ending","user":{"login":"basmaseyam","id":17016909,"avatar_url":"https://avatars.githubusercontent.com/u/17016909?v=3","gravatar_id":"","url":"https://api.github.com/users/basmaseyam","html_url":"https://github.com/basmaseyam","followers_url":"https://api.github.com/users/basmaseyam/followers","following_url":"https://api.github.com/users/basmaseyam/following{/other_user}","gists_url":"https://api.github.com/users/basmaseyam/gists{/gist_id}","starred_url":"https://api.github.com/users/basmaseyam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basmaseyam/subscriptions","organizations_url":"https://api.github.com/users/basmaseyam/orgs","repos_url":"https://api.github.com/users/basmaseyam/repos","events_url":"https://api.github.com/users/basmaseyam/events{/privacy}","received_events_url":"https://api.github.com/users/basmaseyam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T21:28:37Z","updated_at":"2016-05-31T21:30:24Z","closed_at":null,"body":"Challenge [Confirm the Ending](https://www.freecodecamp.com/challenges/confirm-the-ending#?solution=%0Afunction%20confirmEnding(str%2C%20target)%20%7B%0A%20%20%2F%2F%20%22Never%20give%20up%20and%20good%20luck%20will%20find%20you.%22%0A%20%20%2F%2F%20--%20Falcor%0A%20%20var%20substring%3B%0A%20%20var%20arr%3Dstr.split(%22%20%22)%3B%0A%20%20if(arr.length%3E1)%7B%20%0A%20%20substring%3Darr%5Barr.length-1%5D%3B%0A%20%20%7D%0A%20%20else%7B%0A%20%20substring%3Dstr.substr(str.length-1)%3B%0A%20%20%7D%0A%20%20if(substring%3D%3D%3Dtarget)%7B%0A%20%20return%20true%3B%0A%20%20%7D%0A%20%20else%7B%0A%20%20%20%20return%20false%3B%0A%20%20%7D%0A%7D%0A%0AconfirmEnding(%22He%20has%20to%20give%20me%20a%20new%20name%22%2C%20%22me%22)%3B%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36</code>.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nIn the fifth test case it is written as follows : confirmEnding(\"He has to give me a new name\", \"me\") should return true. while the ending is different (name) than the target (me).\r\n\r\nMy code:\r\n```javascript\r\n\r\nfunction confirmEnding(str, target) {\r\n  // \"Never give up and good luck will find you.\"\r\n  // -- Falcor\r\n  var substring;\r\n  var arr=str.split(\" \");\r\n  if(arr.length>1){ \r\n  substring=arr[arr.length-1];\r\n  }\r\n  else{\r\n  substring=str.substr(str.length-1);\r\n  }\r\n  if(substring===target){\r\n  return true;\r\n  }\r\n  else{\r\n    return false;\r\n  }\r\n}\r\n\r\nconfirmEnding(\"He has to give me a new name\", \"me\");\r\n\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/comments/222827269","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/8879#issuecomment-222827269","issue_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/8879","id":222827269,"user":{"login":"sludge256","id":10524623,"avatar_url":"https://avatars.githubusercontent.com/u/10524623?v=3","gravatar_id":"","url":"https://api.github.com/users/sludge256","html_url":"https://github.com/sludge256","followers_url":"https://api.github.com/users/sludge256/followers","following_url":"https://api.github.com/users/sludge256/following{/other_user}","gists_url":"https://api.github.com/users/sludge256/gists{/gist_id}","starred_url":"https://api.github.com/users/sludge256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sludge256/subscriptions","organizations_url":"https://api.github.com/users/sludge256/orgs","repos_url":"https://api.github.com/users/sludge256/repos","events_url":"https://api.github.com/users/sludge256/events{/privacy}","received_events_url":"https://api.github.com/users/sludge256/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T21:30:24Z","updated_at":"2016-05-31T21:30:24Z","body":"\"He has to give me a new na**_me_**\""}}
{"actor":{"display_login":"sludge256"}}