Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript Your First JavaScript Program

Robert Kerns
Robert Kerns
233 Points

its telling me that i didnt call the function i wrote document.write("<h1> welcome to my site</h1>"); on line 12

im thinking that i need to add another code to call the function that i wrote on line 12 not realy sure how to go about it tho

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>

<body>
</body>

  <>
document.write("<h1> welcome to my site</h1>");

</script>

</html>

2 Answers

Robert Kerns
Robert Kerns
233 Points

im not exactly sure why that was the problem but it worked very helpful thankyou.

Andrew Hickman
seal-mask
.a{fill-rule:evenodd;}techdegree
Andrew Hickman
Full Stack JavaScript Techdegree Student 10,013 Points

Just like most other HTML tags, the <script> tag requires both an opening and closing tag. So you just fixed the opening tag, which tells the browser to run the JavaScript between it and your closing tag.

I'm afraid you got the extra "<>" before calling the function.