Question: TypeScript syntax: 1) Define a Typescript class for representing students with three attributes: firstname, lastname, admissionYear; 2) Create an array called studentList, store 5 students
TypeScript syntax:
-
1) Define a Typescript class for representing students with three attributes: firstname, lastname, admissionYear;
-
2) Create an array called studentList, store 5 students object to studentList array using push function. You can pick any values for the sample student names or admission years (ranging from 2014 to 2019)
-
3) Use a for loop to print out the number of years to graduate for students in the year. Your output should look like below: John Howard will graduate in 3 years Mary Lee will graduate in 2 years
...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
