-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.js
More file actions
24 lines (24 loc) · 820 Bytes
/
classes.js
File metadata and controls
24 lines (24 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var Student = /** @class */ (function () {
function Student(address, phone) {
// val num=67;
// let num3=89;
// let num:number=86;
// var num5: number=86;
this.id = 56;
this.name1 = "Vishal";
this.name = "Aman";
if (address != undefined)
this.address = address;
if (phone != undefined)
this.phone = phone;
}
Student.prototype.greet = function () {
console.log("---------Welcome New World!!----------");
return "hello" + this.name;
};
return Student;
}());
var s1 = new Student(102, 8400446340);
// console.log( 'id is ${s1.id} and name is ${s1.name1}' );
// console.log( 'address is ${s1.address} and phone is ${s1.phone}' );
console.log(s1.greet());