--- id: 587d7b7e367417b2b2512b23 title: Use the parseInt Function challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'assert(/parseInt/g.test(code), "convertToInteger should use the parseInt() function");' - text: '' testString: 'assert(typeof(convertToInteger("56")) === "number", "convertToInteger("56") should return a number");' - text: '' testString: 'assert(convertToInteger("56") === 56, "convertToInteger("56") should return 56");' - text: '' testString: 'assert(convertToInteger("77") === 77, "convertToInteger("77") should return 77");' - text: '' testString: 'assert.isNaN(convertToInteger("JamesBond"), "convertToInteger("JamesBond") should return NaN");' ```
## Challenge Seed
```js function convertToInteger(str) { } convertToInteger("56"); ```
## Solution
```js // solution required ```