-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathobjects.html
More file actions
57 lines (44 loc) · 1016 Bytes
/
objects.html
File metadata and controls
57 lines (44 loc) · 1016 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>Javascript - Day 2</title>
<script>
var me = {
"first":"erin",
"last":"sparling",
"age":33,
"occupation":"nerd",
"whereIHaveLived":["brooklyn","manhattan","pittsburgh","chicago","san francisco"]
};
var mike = {
"first":"mike",
"last":"essl",
"occupation":"teacher",
"tattoos":"lots"
};
var people = [me,mike];
console.log(me.whereIHaveLived[0]);
console.log(me.height + "there");
var teachers = {
"adjunct":["Erin Sparling","Roy Rub"],
"faculty":["Mike Essl","Walid Raad"]
};
var formerStudents = {
"2008":["Joe Kendall","Saki Sato"],
"2012":["Greg Skiano","Morgan Vo"]
}
var cooperInfo = {
"teachers":teachers,
"formerStudents":formerStudents
}; //mind blown
console.log(cooperInfo.teachers.adjunct[0]);
var food = {
"italian":"pizza",
"french":"cheese"
};
food.ridiculous = food.italian + " " + food.french;
</script>
</head>
<body>
</body>
</html>