We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If example you suggest is used for producing the expected result then it if I am not mistaken it has a bug.
if (index > arr.length - 1) return value // end condition
Row number 3 has to be updated to : if (index > = arr.length - 1) return value // end condition module.exports = reduce
Below is output of expected result input and solution:
input: [ 'enim', 'enim', 'cupidatat', 'fugiat', 'sunt', 'ullamco', 'occaecat', 'amet', 'laborum', 'ipsum', 'dolor', 'elit', 'incididunt', 'ea', 'laborum', 'nostrud', 'cupidatat', 'ipsum', 'veniam', 'ipsum', 'quis', 'anim', 'occaecat', 'tempor', 'cupidatat', 'deserunt', 'qui', 'aute', 'laboris', 'magna', 'in' ] submission: { enim: 2, cupidatat: 3, fugiat: 1, sunt: 1, ullamco: 1, occaecat: 2, amet: 1, laborum: 2, ipsum: 3, dolor: 1, elit: 1, incididunt: 1, ea: 1, nostrud: 1, veniam: 1, quis: 1, anim: 1, tempor: 1, deserunt: 1, qui: 1, aute: 1, laboris: 1, magna: 1 } solution: { enim: 2, cupidatat: 3, fugiat: 1, sunt: 1, ullamco: 1, occaecat: 2, amet: 1, laborum: 2, ipsum: 3, dolor: 1, elit: 1, incididunt: 1, ea: 1, nostrud: 1, veniam: 1, quis: 1, anim: 1, tempor: 1, deserunt: 1, qui: 1, aute: 1, laboris: 1, magna: 1, in: 1 }
As you can see there is a word : 'in' that is missing in the solution output and present in my version.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If example you suggest is used for producing the expected result then it if I am not mistaken it has a bug.
})(0, initial) // IIFE. kick off recursion with initial values
}
Row number 3 has to be updated to : if (index > = arr.length - 1) return value // end condition
module.exports = reduce
Below is output of expected result input and solution:
input: [ 'enim', 'enim', 'cupidatat', 'fugiat', 'sunt', 'ullamco', 'occaecat', 'amet', 'laborum', 'ipsum', 'dolor', 'elit', 'incididunt', 'ea', 'laborum', 'nostrud', 'cupidatat', 'ipsum', 'veniam', 'ipsum', 'quis', 'anim', 'occaecat', 'tempor', 'cupidatat', 'deserunt', 'qui', 'aute', 'laboris', 'magna', 'in' ]
submission: { enim: 2, cupidatat: 3, fugiat: 1, sunt: 1, ullamco: 1, occaecat: 2, amet: 1, laborum: 2, ipsum: 3, dolor: 1, elit: 1, incididunt: 1, ea: 1, nostrud: 1, veniam: 1, quis: 1, anim: 1, tempor: 1, deserunt: 1, qui: 1, aute: 1, laboris: 1, magna: 1 }
solution: { enim: 2, cupidatat: 3, fugiat: 1, sunt: 1, ullamco: 1, occaecat: 2, amet: 1, laborum: 2, ipsum: 3, dolor: 1, elit: 1, incididunt: 1, ea: 1, nostrud: 1, veniam: 1, quis: 1, anim: 1, tempor: 1, deserunt: 1, qui: 1, aute: 1, laboris: 1, magna: 1, in: 1 }
As you can see there is a word : 'in' that is missing in the solution output and present in my version.
The text was updated successfully, but these errors were encountered: