-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
49 lines (46 loc) · 1.39 KB
/
script.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
var customersJSON_example = [
{
"firstName": "John",
"lastName": "Smith",
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "fax",
"number": "646 555-4567"
}
]
},
{
"firstName": "Ben",
"lastName": "Jones",
"age": 34,
"address": {
"streetAddress": "432 Smith Street",
"city": "Chicago",
"state": "IL",
"postalCode": "60606"
},
"phoneNumber": [
{
"type": "home",
"number": "847 523-1034"
}
]
}
];
function saySomething(){
console.log('script.js has been fired');
console.log('It contains example JSON containing a list of customers');
console.log('and can be accessed via'+'%c var customersJSON_example','color:#345391;font-weight:bold;');
}
document.addEventListener("DOMContentLoaded", saySomething() );