- Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathobject_constructors.html
More file actions
Latest commit
29 lines (25 loc) · 883 Bytes
/
Copy pathobject_constructors.html
File metadata and controls
29 lines (25 loc) · 883 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
<!doctype html>
<htmllang="en">
<head>
<title>JavaScript Tutorial - Objects and Constructors</title>
<linkrel="stylesheet" href="css/foundation.min.css"></link>
</head>
<body>
<!-- JAVASCRIPT -->
<scripttype="text/javascript">
functionteam(city,qb)
{
this.city=city;
this.qb=qb;
}
varPatriots=newteam("New England","Tom Brady");
varRavens=newteam("Baltimore","Joe Flacco");
varBroncos=newteam("Denver","Peyton Manning");
varSeahawks=newteam("Seattle","Russell Wilson");
document.write("Seahawks: City - "+Seahawks.city+" Quarterback - "+Seahawks.qb+"<br>");
document.write("Ravens: City - "+Ravens.city+" Quarterback - "+Ravens.qb+"<br>");
document.write("Broncos: City - "+Broncos.city+" Quarterback - "+Broncos.qb+"<br>");
</script>
<!-- END JAVASCRIPT -->
</body>
</html>