-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjects.js
More file actions
38 lines (34 loc) · 940 Bytes
/
Copy pathObjects.js
File metadata and controls
38 lines (34 loc) · 940 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var housekeeper1 = {
name: "Mary",
hourlyWage: 15,
languages: ['English', 'German'],
overtime: false,
avgHours: 7.8
};
var bellboy1 = {
name: "John",
hourlyWage: 15,
languages: ['English', 'French'],
overtime: true,
avgHours: 9.6
};
//Constructor Function
function BellBoy (name, age, hasWorkPermit, languages){
this.name = name;
this.age = age;
this.hasWorkPermit = hasWorkPermit;
this.languages = languages;
};
function HouseKeeper (name, hourlyWage, languages, overtime, avgHours){
this.name = name;
this.hourlyWage = hourlyWage;
this.languages = languages;
this.overtime = overtime;
this.avgHours = avgHours;
this.clean = function (){
alert("Cleaning the Room");
}
}
var bellBoy2 = new BellBoy("Timmy", 19, true, ["French", "English"]);
var housekeeper2 = new HouseKeeper("Jane", 15, ["English", "Mandarin"], true, 3.6);
housekeeper2.clean;