2.1 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.1 KiB
		
	
	
	
	
	
	
	
id, title, challengeType, videoUrl, localeTitle
| id | title | challengeType | videoUrl | localeTitle | 
|---|---|---|---|---|
| 587d7b85367417b2b2512b3a | Catch Arguments Passed in the Wrong Order When Calling a Function | 1 | Detectar argumentos pasados en el orden incorrecto al llamar a una función | 
Description
Instructions
raiseToPower eleva una base a un exponente. Desafortunadamente, no se llama correctamente: corrija el código para que el valor de la power sea el 8 esperado. Tests
tests:
  - text: 'Su código debe fijar la <code>power</code> variable de manera 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 <code>power</code> 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 <code>raiseToPower</code> función <code>raiseToPower</code> .
    testString: 'assert(code.match(/raiseToPower\(\s*?base\s*?,\s*?exp\s*?\);/g), "Your code should use the correct order of the arguments for the <code>raiseToPower</code> function call.");'
Challenge Seed
function raiseToPower(b, e) {
  return Math.pow(b, e);
}
let base = 2;
let exp = 3;
let power = raiseToPower(exp, base);
console.log(power);
Solution
// solution required