Files
Randell Dawson 7164d9a797 fix(guide): Added solutions and some hints and problem explanations for curriculum related Guide articles being ported over to forum (#36545)
* fix: added info and solutions for stubs

* fix: made title match main header

* fix: removed wrong closing tag

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: added closing tag

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: corrected solution

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: changed verbiage

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: added code tags

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: added solution
2019-08-01 14:16:54 +02:00

307 B

title
title
Averages/Root mean square

Averages/Root mean square


Solutions

Solution 1 (Click to Show/Hide)
function rms(arr) {
  const sumOfSquares = arr.reduce((s, x) => s + x * x, 0);
  return Math.sqrt(sumOfSquares / arr.length);
}