Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -1,4 +1,4 @@
function horner(coeffs, x) {
return coeffs.reduceRight(function(acc, coeff) {return(acc * x + coeff)}, 0);
return coeffs.reduceRight( function(acc, coeff) { return(acc * x + coeff) }, 0);
}
print(horner([-19,7,-4,6],3)); // ==> 128
console.log(horner([-19,7,-4,6],3)); // ==> 128