Finding all properties of a javascript class
- by uzay95
I have classes looks like below:
function Student(name, surname, lossons){
this.Name = name;
this.Surname = surname;
this.Lessons = lessons;
}
function Lesson(){
this.Name = name;
this.studentCount = count;
}
And i want to write ToString method to them. But i don't want to write and add them one by one. Is there any way to do this like reflection in C# or Java ?
Any help would be appreciated...