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){
|
function sum(a){
|
||||||
|
|
||||||
// Your code goes here.
|
// Your code goes here.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,15 +15,12 @@ describe("sum", function(){
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let argumentList of testArgumentLists){
|
for (let argumentList of testArgumentLists){
|
||||||
|
|
||||||
it(makeTestCaseName(argumentList), function(){
|
it(makeTestCaseName(argumentList), function(){
|
||||||
assert.equal(traditionalSum(argumentList), chainCallSum(argumentList));
|
assert.equal(traditionalSum(argumentList), chainCallSum(argumentList));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function traditionalSum(arr){
|
function traditionalSum(arr){
|
||||||
return arr.reduce(
|
return arr.reduce(
|
||||||
function(accumulator, item){
|
function(accumulator, item){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue