--- title: Averages-Root mean square id: 594da033de4190850b893874 challengeType: 5 videoUrl: '' localeTitle: 平均值 - 均方根 --- ## Description

计算数字1到10(包括1和10)的均方根

均方根也以其首字母RMS(或rms)和二次均值来表示。

RMS计算为数字平方的平均值,平方根:

$$ x _ {\ mathrm {rms}} = \ sqrt {{{x_1} ^ 2 + {x_2} ^ 2 + \ cdots + {x_n} ^ 2} \ over n}。 $$

## Instructions
## Tests
```yml tests: - text: rms是一个功能。 testString: 'assert(typeof rms === "function", "rms is a function.");' - text: 'rms([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])应等于6.2048368229954285 。' testString: 'assert.equal(rms(arr1), answer1, "rms([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) should equal 6.2048368229954285.");' ```
## Challenge Seed
```js function rms (arr) { // Good luck! } ```
### After Test
```js console.info('after the test'); ```
## Solution
```js // solution required ```