-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Challenge http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays has an issue #520
Comments
Fixed with a previous commit. Thanks for the heads up! |
This was referenced Aug 29, 2022
This was referenced Aug 30, 2022
This was referenced Aug 30, 2022
This was referenced Aug 30, 2022
This was referenced Oct 5, 2022
This was referenced Oct 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution produces results equal to those asserted but but fails same tests, below. Code to replicate included, below.
assert(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]).should.eql([9,35,97,1000000]));Cannot read property 'eql' of undefined
(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])).should.eql([5,27,39,1001]);Cannot read property 'eql' of undefined
function largestOfFour(arr) {
maxArr = [];
maxNum = 0;
for (var x in arr) {
for(var y in arr[x]) {
if (arr[x][y] > maxNum) maxNum = arr[x][y];
}
maxArr.push(maxNum);
maxNum = 0;
}
return maxArr;
}
The text was updated successfully, but these errors were encountered: