Question: Java script / HTML 5 Write a function integerPower( base, exponent ) that returns the value of base exponent For example, integerPower( 3, 4 )
Java script / HTML 5
Write a function integerPower( base, exponent ) that returns the value of base exponent For example, integerPower( 3, 4 ) = 3 * 3 * 3 * 3. Assume that exponent and base are integers. Function integerPower should use a for or while statement to control the calculation. Incorporate this function into a script that reads integer values from an HTML5 form for base and exponent and performs the calculation with the integerPower function. The HTML5 form should consist of two text fields and a button to initiate the calculation. The user should interact with the pro- gram by typing numbers in both text fields, then clicking the button.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
