Follow the instructions in the TS file
Using TypeScript, do the following:
- Create a function to add student data to an array as an array of objects and render objects to the page
Be sure your function parameters are given strict types
-
Define your data structure using a custom Type. https://www.digitalocean.com/community/tutorials/how-to-create-custom-types-in-typescript
-
Student
- First name (string)
- Last name (string)
- Course (string)
- Grade (number or string)
- isPassing (boolean value if grade is greater than a D)
-
If student is passing, render a green symbol/icon next to their entry in the table
-
If student is not passing, render a red symbol/icon next to their entry in the table
-
It is up to you to calculate based on grade (numerical or letter) if student is passing or not
-
Data should be rendered in the form of a table
-
Add a button that sorts the data based on Grade (ascending order)
-
Add a button that sorts the data based on Course (ascending order)