{"action":"closed","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3072","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3072/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3072/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/3072/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/3072","id":104980675,"number":3072,"title":"Javascript logic error ","user":{"login":"gizmocd","id":14033587,"avatar_url":"https://avatars.githubusercontent.com/u/14033587?v=3","gravatar_id":"","url":"https://api.github.com/users/gizmocd","html_url":"https://github.com/gizmocd","followers_url":"https://api.github.com/users/gizmocd/followers","following_url":"https://api.github.com/users/gizmocd/following{/other_user}","gists_url":"https://api.github.com/users/gizmocd/gists{/gist_id}","starred_url":"https://api.github.com/users/gizmocd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gizmocd/subscriptions","organizations_url":"https://api.github.com/users/gizmocd/orgs","repos_url":"https://api.github.com/users/gizmocd/repos","events_url":"https://api.github.com/users/gizmocd/events{/privacy}","received_events_url":"https://api.github.com/users/gizmocd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-04T22:26:38Z","updated_at":"2015-09-04T22:28:01Z","closed_at":"2015-09-04T22:28:01Z","body":"Challenge http://freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays has an issue. Please describe how to reproduce it, and include links to screenshots if possible.\r\nHere is the code:\r\n\r\nfunction largestOfFour(arr) {\r\n  // You can do this!\r\n  var arraylength = arr.length;\r\n  //asdf\r\n  var finalArray = [];\r\n  var comparer = [];\r\n  var xterminate = 0;\r\n  while (xterminate !== arr.length){\r\n    \r\n    if(arr[xterminate][1] < arr[xterminate][2]){\r\n      comparer[1]=arr[xterminate][2];\r\n    }\r\n    else{\r\n      comparer[1]=arr[xterminate][1];\r\n    }\r\n        if(arr[xterminate][3] < arr[xterminate][4]){\r\n      comparer[2]=arr[xterminate][4];\r\n    }\r\n    else{\r\n      comparer[2]=arr[xterminate][3];\r\n    }\r\n        if(comparer[1] < comparer[2]){\r\n      finalArray[xterminate]=comparer[2];\r\n    }\r\n    else{\r\n      finalArray[xterminate]=comparer[1];\r\n    }\r\n  xterminate++;\r\n  }\r\n  \r\n  //asdf\r\n  arr = finalArray;\r\n  return arr;\r\n}\r\n\r\nlargestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]);\r\n\r\n//The output on freecodecamp is [9,35,97,1000000]\r\n//"}}