--- title: Gray code id: 5a23c84252665b21eecc7e80 challengeType: 5 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(typeof gray=="function","gray should be a function.");' - text: '' testString: 'assert(typeof gray(true,177)=="number","gray(true,177) should return a number.");' - text: '' testString: 'assert.equal(gray(true,177),233,"gray(true,177) should return 233.");' - text: '' testString: 'assert.equal(gray(true,425),381,"gray(true,425) should return 381.");' - text: '' testString: 'assert.equal(gray(true,870),725,"gray(true,870) should return 725.");' - text: '' testString: 'assert.equal(gray(false,233),177,"gray(false,233) should return 177.");' - text: '' testString: 'assert.equal(gray(false,381),425,"gray(false,381) should return 425.");' - text: '' testString: 'assert.equal(gray(false,725),870,"gray(false,725) should return 870.");' ```
## Challenge Seed
```js function gray(enc, number) { // Good luck! } ```
## Solution
```js // solution required ```