forked from bloominstituteoftechnology/JavaScript-IV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda-classes.js
More file actions
45 lines (43 loc) · 1.13 KB
/
Copy pathlambda-classes.js
File metadata and controls
45 lines (43 loc) · 1.13 KB
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
// CODE here for your Lambda Classes
class Person{
constructor(attributes){
this.name = attributes.name;
this.age = attributes.age;
this.location = attributes.location;
}
speak(){
return `Hello, my name is {$this.name}, I am from {$this.location}`;
}
}
fred = {
name: 'Fred',
location: 'Bedrock',
age: 33,
favLanguage: 'JavaScript',
specialty: 'Front-end',
catchPhrase: `Don't forget the homies`
}
fred = {
name: 'Kat',
location: 'Alaska',
age: 33,
favLanguage: 'Python',
specialty: 'Back-end',
catchPhrase: `Keep your feet on the ground`
}
class Instructor{
constructor(attributes){
this.name = attributes.name;
this.age = attributes.age;
this.location = attributes.location;
this.specialty = attributes.speciality;
this.favLanguage= attributes.language;
this.catchphrase = attributes.catchphrase;
}
demo(){
return `Hello, my name is {$this.name}, I am from {$this.location}`;
}
grade(){
return `Hello, my name is {$this.name}, I am from {$this.location}`;
}
}