+ 1

1

15. Write a JavaScript function to compute the value of bn where n is the exponent and b is the bases. Accept b and n from the user and display the result. .

13th Dec 2016, 1:53 PM
Nashwan Aziz
Nashwan Aziz - avatar
1 Resposta
+ 2
function power(b, n) { return Math.pow(b, n); } This should work, I haven't been able to test it myself.
14th Dec 2016, 10:46 PM
Riley Johnson
Riley Johnson - avatar