This assignment has a series of problems I want you to solve by writing the
JavaScript code.
- Problem #1: Take in the name of an item, the price of the item and the cost of the item.
On the document write the name of the item and the profit that you can get from the
item. Remember profit is price - cost.
- Problem #2: Take in the pay per hour, the hours worked, and the withhold amount.
Multiply the pay per hour by the hours worked to get the gross pay. Subtract the withhold
amount to get the net pay. Display both the gross pay and the net pay.
- Problem #3: Take in the student name. Take in the grade for the first test, the
grade for the second test, the grade for the third test and the grade for the fourth
test. Determine the average grade for the four tests. Display the student name and
the average grade.
- Problem #4: Take in the student name. Take in the grade for the first test, the
grade for the second test, the grade for the third test and the grade for the fourth
test. Determine the average grade for the four tests. Display the student name and
the average grade. Use if statements to determine the letter grade and display the
letter grade.