Question: JavaScript Objects Using JavaScript, Write a constructor function for a Student object that has properties of firstName, lastName, and grade, and a method called setGrade
JavaScript Objects
Using JavaScript, Write a constructor function for a Student object that has properties of firstName, lastName, and grade, and a method called setGrade to set the grade.
Create an object with the name Jane Doe with a grade of B.
Call the setGrade method to change the grade to an A.
Create a second object with the name John Doe with a grade of C.
Create a third object with your name and a grade of your choice.
Display the students and their grades in a table on the page.
Objects
Your code must include a constructor function, with the specified properties and methods.
Your code must include the specified objects.
Your code must include a call to change a grade.
Your code must include a way to display the students and their grades in a table on the page.
Validation logic must be included in comments in your JS file to show how you tested your code.
Objects and functions must be in a separate JS file linked to your HTML file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
