class Surgeon{
constructor(name, department){
this.name = name;
this.department = department;
}
}
The instructions are
Inside the Surgeon constructor(), create name and department properties and set them equal to your input parameters.
I wanted to know which end are my parameters and which end is are my properties.
If I’m correct
this.name
this.department (These are my properties).
My other question. Hopefully, I can explain this properly.
When I was creating objects the syntax is:
let myObject ={
name: ‘blah’,
color: ‘blah’
}
I could then call back to name and color but with classes, I never created these keys.
How is it that I’m referring to name and department using this when name and department were never created.
Thanks.