-
Notifications
You must be signed in to change notification settings - Fork 0
/
main2.js
66 lines (57 loc) · 1.44 KB
/
main2.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
class student {
constructor({
name,
email,
username,
twitter = undefined,
instagram = undefined,
facebook = undefined,
approvedCourses = [],
lerningPaths =[],
})
{
this.email =email;
this.name =name;
this.username =username;
this.socialMedia ={
twitter, //se puede poner directamente el nombre sin igualar como el los siguientes
instagram,
facebook,
};
this.approvedCourses =approvedCourses;
this.lerningPaths =lerningPaths;
}
}
class schools {
constructor({
name,
coutCourses,
}){
this.name = name;
this.coutCourses = coutCourses;
}
}
const schoolWebDesigner = new schools ({
name: "escuela de diseñadores web",
coutCourses: 15,
})
const schoolWebDesigner2 = new schools ({
name: "escuela de diseñadores grafico",
coutCourses: 13,
})
const schoolWebDesigner3 = new schools ({
name: "escuela de javascript",
coutCourses: 58,
})
const juan = new student({
name:"Julian",
username: "El macho",
email:"julianmartinez@hotmail.com",
socialMedia:{
twitter:"elmacjho193",
facebook:"chandito7843"
},
approvedCourses:["principios del ego", "somos muchos en este mundo", "la felicidad y como manejarla"],
lerningPaths:[schoolWebDesigner2, schoolWebDesigner3],
})
console.log(juan)