Section 9.13 Write a function for the following

Write a function integerPower( base, exponent ) that returns the value ofbase 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 XHTML form for base and exponent and performs the calculation with the integerPower function. The XHTML form should consist of two text fields and a button to initiate the calculation. The user should interact with the program by typing numbers in both text fields then clicking the button.



Enter x:
Enter y:

This whole question is already done for use in the Math class of Javascript. You can just use Math.pow(x,y).