Last active 7 months ago

portalzine's Avatar portalzine revised this gist 7 months ago. Go to revision

2 files changed, 3 insertions

solution.js(file created)

@@ -0,0 +1,2 @@
1 + var sum = myfoos.reduce(function(a, b) { return a + b; });
2 + var avg = sum / myfoos.length;

solution.php(file created)

@@ -0,0 +1 @@
1 + $average_of_myfoos = array_sum($myfoos) / count($myfoos);
Newer Older