This assignment builds on what you have already learned and demonstrated in class through the
exercises and assessments to this point (i.e. up to and including DOM APIs). You are responsible for
adding the JavaScript that will bring this page to life.
For this assignment, you are required to implement the necessary JavaScript that will enable a user to
enter a series of transactions (debits and credits). The page will validate form input (e.g. type must be
either debit or credit) and will add the entered transaction to the transactions table. The page will also
track the totals for each type of transaction and allow the user to delete transactions.
The form should only allow transactions that have had a valid type chosen (i.e. not type) and a positive
numeric value in the amount field to be added (use the provided div.error element to provide error
messages). Currency values should be displayed with a dollar sign and to two decimal places.
You will need to make use of the number type’s toFixed() method, which you can read more about
here1.
The markup for the individual transactions (both credit and debit) is as shown:
Required Tasks
The following is a list of requirements for this assignment:
• An event listener is required for handling submission of the transaction form
o The page should not refresh
o The user must choose a proper type from the select dropdown and the amount must be
a positive number