-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOOP-1.js
More file actions
23 lines (23 loc) · 761 Bytes
/
OOP-1.js
File metadata and controls
23 lines (23 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//class = Data + function
// class = characterstics + Behaviours
var Student = /** @class */ (function () {
function Student(N, M, A, C) {
console.log("Inside the constructor");
this.Name = N;
this.Marks = M;
this.Age = A;
this.City = C;
}
Student.prototype.Display = function () {
console.log("Name of student : ", this.Name);
console.log("Marks of student : ", this.Marks);
console.log("Age of student : ", this.Age);
console.log("City of student : ", this.City);
};
return Student;
}());
// creating object
var Obj123 = new Student("Sidheshwar", 7.25, 22, "Ahemdnagar");
var Obj124 = new Student("Vishal", 7.25, 21, "Shevgoan");
Obj123.Display();
Obj124.Display();