-
Notifications
You must be signed in to change notification settings - Fork 0
/
38.oop.js
67 lines (62 loc) · 1.82 KB
/
38.oop.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var person = {
fname: "kishan",
mname: "d",
lname: "vasani",
no: "180200107118",
clg: "gecr",
fullname: () => {
return (person.fname + " " + person.mname + " " + person.lname);
}
};
document.write(person.fullname() + "<br>");
document.write(person + "<br>");
document.write(person.clg + "<br>");
//
var man = {}
man.fname = "kishan";
man.mname = "d";
man.lname = "vasani";
man.no = "180200107118";
man.clg = "gecr";
man.fullname = () => {
return (person.fname + " " + person.mname + " " + person.lname);
};
man.man_all = () => {
return (person.fname + " " + person.mname + " " + person.lname + "<br>" + man.no + "<br>" + man.clg);
};
document.write(man.man_all() + "<br>");
//writing methid threee
var man2 = {}
man2["fname"] = " kishan";
man2["mname"] = "d";
man2["name"] = "vasani";
man2["no"] = "180200107118";
man2["clg"] = "gecr";
man2["fullname"] = () => {
return (person.fname + " " + person.mname + " " + person.lname);
};
man["man2_all"] = () => {
return (person.fname + " " + person.mname + " " + person.lname + "<br>" + man.no + "<br>" + man.clg);
};
document.write(man["man_all"]() + "<br>");
document.write("threee" + "<br>");
//
var man = {}
man['fname'] = 100;
man['mname'] = 2000;
man['lname'] = 30000;
man['no'] = 180200107118;
man['clg'] = " gecr";
man['fullname'] = () => {
return (person.fname + " " + person.mname + " " + person.lname);
};
man['man_all'] = () => {
return (person.fname + " " + person.mname + " " + person.lname + "<br>" + man.no + "<br>" + man.clg);
};
document.write(man.man_all() + "<br>");
document.write("four" + "<br>");
//
var man = { fname: 100, mname: 2000, lname: 30000, no: 180200107118, clg: " gecr" };
document.write(man.fname + "<br>" + man.mname + "<br>" + man.lname + "<br>" + man.no + "<br>" + man.clg + "<br>");
document.write("five" + "<br>");
//