-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathobjects-with-objects.html
More file actions
59 lines (48 loc) · 1.09 KB
/
objects-with-objects.html
File metadata and controls
59 lines (48 loc) · 1.09 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<title>Javascript - Objects</title>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
var currentEmployer = {
"title":"consultant",
"organization":"Gannett"
}
var freelanceEmployer = {
"title":"adjunct",
"organization":"Cooper Union"
}
var volunteerEmployer = {
"title":"nerd",
"organization":"Park Slope Food Coop"
}
var me = {
"first":"erin",
"last":"sparling",
"employer":[
freelanceEmployer,
currentEmployer,
volunteerEmployer
],
"placeOfResidence":"brooklyn",
"currentLocation":"Cooper Union"
};
var me = {
"first":"erin",
"last":"sparling",
"employer":[
{"title":"adjunct","organization":"Cooper Union"},
{"title":"nerd","organization":"Park Slope Food Coop"},
{"title":"consultant","organization":"Gannett"}
],
"placeOfResidence":"brooklyn",
"currentLocation":"Cooper Union"
};
$("body").append(me.employer[0].title);
});
</script>
</head>
<body>
</body>
</html>