raiseToPower
返回基数 (base) 的指数 (exponent) 次幂。不幸的是,它没有被正确调用 ———— 修改代码,使power
的值为 8。
power
,使其等于 2 的 3 次方,而不是 3 的 2 次方。
testString: assert(power == 8);
- text: 你调用raiseToPower
函数时,传递参数的顺序应正确。
testString: assert(code.match(/raiseToPower\(\s*?base\s*?,\s*?exp\s*?\);/g));
```