JavaScript Functions Part 2: Sales Commission Calculator

Objectives

  • Calculate gross sales, then 9% commission plus $250
  • jQuery mouse over with message
  • Check for valid numeric input
  • Add buttons for submitting data and clearing form

Salesperson Earnings

Item Price Qty Sold Total $
$20.99
$12.75
$9.95
$35.89

Part 1


Create a script that calculates a student's final class grade by finding the average scores homework, exams, and participation. The output will show both percentage number and letter grade with the message if student passes or fails the class.

View Part 1

Part 2


Create a script that shows commission earned by salesperson by finding total dollar amount of items sold of various prices, then calculating a percentage of the total amount, finally adding the salesperson's set weekly payment.

View Part 2

Part 3


Program a game that helps elementary students learn multiplications. Showing two random one-digit integers with an input field for student to enter their answer. The script will check if the answer is correct and output a message depending if the answer is correct or not. The student will have the option reset the game and play again or end their session.

View Part 3