Object Instances
This lesson teaches how to create object instances using constructor functions by explaining the syntax and giving an example.
In the previous lesson, we learned how to create a constructor function and how all the objects created using this will contain the properties defined inside the constructor. Now let’s discuss how to create objects using the constructor function.
Press + to interact
function Employee(_name, _age, _designation){this.name = _namethis.age = _agethis.designation = _designation}
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy