raiseToPower
eleva una base a un exponente. Desafortunadamente, no se llama correctamente: repare el código para que el valor de la power
sea el esperado 8.
power
variable de modo que sea igual a 2 elevado a la tercera potencia, no 3 elevado a la segunda potencia'
testString: 'assert(power == 8, "Your code should fix the variable power
so it equals 2 raised to the 3rd power, not 3 raised to the 2nd power.");'
- text: Su código debe usar el orden correcto de los argumentos para la raiseToPower
función raiseToPower
.
testString: 'assert(code.match(/raiseToPower\(\s*?base\s*?,\s*?exp\s*?\);/g), "Your code should use the correct order of the arguments for the raiseToPower
function call.");'
```