4 | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

4

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.

11th Dec 2016, 7:59 PM
Nashwan Aziz
Nashwan Aziz - avatar
1 ответ
+ 2
Try this : window.onload = function main() { var x = prompt("Input base") ; var y = prompt("Input exponent") ; alert(Math.pow(x,y)) }
16th Dec 2016, 8:42 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar