--- title: Emirp primes id: 599d0ba974141b0f508b37d5 challengeType: 5 videoUrl: '' localeTitle: Emirp奖金 --- ## Description

一个emirp(向后拼写的主要拼写)是素数,当它们被反转时(在它们的十进制表示中)是一个不同的素数。

编写应能功能:显示前n eprimes numbers.Show在range.Show的eprimes数字eprimes的在range.Show n eprimes数目。

该函数应该有两个参数。第一个将接收n或作为数组的范围。第二个将接收一个布尔值,它指定函数是否将eprimes作为数组或单个数字(范围中的素数或第n 素数)返回。根据参数,函数应返回数组或数字。

## Instructions
## Tests
```yml tests: - text: emirps是一个功能。 testString: 'assert(typeof emirps === "function", "emirps is a function.");' - text: 'emirps(20,true)应该返回[13,17,31,37,71,73,79,97,107,113,149,157,167,179,199,311,337,347,359,389]' testString: 'assert.deepEqual(emirps(20, true), [13, 17, 31, 37, 71, 73, 79, 97, 107, 113, 149, 157, 167, 179, 199, 311, 337, 347, 359, 389], "emirps(20,true) should return [13,17,31,37,71,73,79,97,107,113,149,157,167,179,199,311,337,347,359,389]");' - text: emirps(10000)应该返回948349 testString: 'assert.deepEqual(emirps(10000), 948349, "emirps(10000) should return 948349");' - text: 'emirps([7700,8000],true)应该返回[7717,7757,7817,7841,7867,7879,7901,7927,7949,7951,7963]' testString: 'assert.deepEqual(emirps([7700, 8000], true), [7717, 7757, 7817, 7841, 7867, 7879, 7901, 7927, 7949, 7951, 7963], "emirps([7700,8000],true) should return [7717,7757,7817,7841,7867,7879,7901,7927,7949,7951,7963]");' - text: 'emirps([7700,8000],true)应该返回11' testString: 'assert.deepEqual(emirps([7700, 8000], false), 11, "emirps([7700,8000],true) should return 11");' ```
## Challenge Seed
```js function emirps(n) { // Good luck! } ```
## Solution
```js // solution required ```