<html>
<head> <meta name="generator" content=
"HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
<script type="text/javascript">
function person(name, age) {
this.name = name;
this.age = age;
}
var bucky = new person ("Bucky Roberts, 24");
var Taylor = new person (Taylor Swift, 20");
</script>
</head>
<body>
<script type = "text/javascript">
document.write(taylor.age);
</script>
</body>
</html>
Travis_4
0
Newbie Poster
Recommended Answers
Jump to PostYou use Taylor in line 11 and taylor in line 16.
Also, lines 10, 11 have errors. Strange quote marks there.
I didn't check for anything else.
All 4 Replies
Travis_4
0
Newbie Poster
rproffitt
2,565
"Nothing to see here."
Moderator
diafol
Purvi_1
-12
Light Poster
Banned
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.