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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started