Super easy well not for me I guess

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

22-Oct-17 20:52
Just starting out in a programming course and I'm stumped and I frustrated I need to know how to get both the withholding's and net I cannot figure out how to write it so the program figures out both equations. Please help. Thanks.

var pay = prompt("Enter your houly pay");
var hour = prompt("Enter your hours worked");
var GROSS = parseFloat(pay * hour);
var WITH;
var NET;

if(pay < 300.01)
WITH = pay * hour * .10;
NET = pay - WITH;
alert(("GROSS PAY: $" + GROSS.toFixed(2)) + ("\nWITHHOLDING: $" + WITH.toFixed(2)) + ("\nNET PAY: $" + NET.toFixed(2)));
25-Oct-17 06:15
Using the correct variable in this conditional

if(pay < 300.01)

could be a starting point.

So long, and thanks for all the fish.
25-Oct-17 06:18
Oh and wage deductions are generally based on greater than calculations '>' rather than less than '<'

So long, and thanks for all the fish.

New posts
Old posts

Follow Elated