I am having a heck of a time trying to figure out why my function is not showing a display when I run my .js everything else works but the function area. Below is a copy of my code
var amount_per_hour = parseFloat(prompt("Enter amount of money per hour?", "Enter Amount Per Hour Here"));
var hours_worked = parseFloat(prompt("How many hours for one week?", "Enter Hours Here"));
var hours = 40.0;
var over_time_hours = (hours_worked - hours)
var time_and_half = 1.5;
if (hours_worked > hours) {
total_gross = (amount_per_hour * over_time_hours * time_and_half) + (amount_per_hour * hours);
total_gross = total_gross.toFixed(2);
}
else {
total_gross = (hours_worked * amount_per_hour).toFixed(2);
}
document.writeln("The total gross salary for the week is $" + total_gross +"<p>");
function calculations(grosspay){
var fed_tax = 0.31;
var fed_tax_total = (total_gross * fed_tax);
fed_tax_total = fed_tax_total.toFixed(2);
document.writeln("Federal Taxes = $" + fed_tax_total + "<br>");
var state_tax = 0.08;
var state_tax_total = (total_gross * state_tax);
state_tax_total = state_tax_total.toFixed(2);
document.writeln("State Taxes = $" + state_tax_total + "<br>");
var local_tax = 0.02;
var local_tax_total = (total_gross * local_tax);
document.writeln("Local Taxes = $" + local_tax_total + "<br>");
}
Any help would be appreciated because I'm completely lost at this point.
Thanks
AJ


