Question: Need some help with JQUERY code changes will be made in the future_value.js file. You will be creating a calculateClick function that will fire when

Need some help with JQUERY code changes will be made in the future_value.js file.
You will be creating a calculateClick function that will fire when the button with the ID calculate is clicked.
This function should ensure that the investment, rate and years have valid numbers and is greater then zero.
Hint - isNaN(investment) || investment
If all of them are valid I want you to then run the math formula to calculate the future value. You will need to loop through the amount of years.
Also note that in your for loop you need to use a running total
Hint variable += formula.
After you have looped through the years and have your total, you need to display it in the #future_value input box. Make sure your total variable has the .toFixed() method on it, for full numbers.
Hint look at .val() in JQuery for getting and setting values.
Future value js file i started
var calculateClick = function () { // Your code goes here.
}
$(document).ready(function() { $("#calculate").click(calculateClick); $("#investment").focus(); });
the HTML :
Future Value Calculator
Future Value Calculator Investment Amount 10000 Annual Interest Rate: 20 Number of Years: 5 Future Value: 24883 Calculate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
