Got rid of excessive newlines in task/sum-many-brackets sandbox code.
This commit is contained in:
parent
f20fb43f70
commit
e5fe4a08bd
2 changed files with 1 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
|||
function sum(a){
|
||||
|
||||
// Your code goes here.
|
||||
|
||||
}
|
||||
|
|
|
@ -14,16 +14,13 @@ describe("sum", function(){
|
|||
[0, 1, 2, 3, 4, 5],
|
||||
];
|
||||
|
||||
for (let argumentList of testArgumentLists){
|
||||
|
||||
for (let argumentList of testArgumentLists){
|
||||
it(makeTestCaseName(argumentList), function(){
|
||||
assert.equal(traditionalSum(argumentList), chainCallSum(argumentList));
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
function traditionalSum(arr){
|
||||
return arr.reduce(
|
||||
function(accumulator, item){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue