diff --git a/api/average().js b/api/average().js index 41e095b..cb400d6 100644 --- a/api/average().js +++ b/api/average().js @@ -25,7 +25,7 @@ jQuery.fn.dataTable.Api.register( 'average()', function () { var data = this.flatten(); var sum = data.reduce( function ( a, b ) { return (a*1) + (b*1); // cast values in-case they are strings - } ); + }, 0 ); return sum / data.length; } );