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 Using the Console

Nathan Kim
Nathan Kim
3,837 Points

Hi, I can not get past this challenge. Is there any way you can tell me what I am doing wrong?

I am really struggling with this challenge.

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script>
  <script>console.log("Begin program");</script>
document.write("Welcome to JavaScript Basics");

</script>
</body>
</html>

3 Answers

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script>
console.log('Begin program' );
document.write("Welcome to JavaScript Basics");

</script>
</body>
</html>
Steven Parker
Steven Parker
231,269 Points

Don't add additional script tags.

Just use the ones already there and put your additional JavaScript code on the blank lines provided.

Nathan Kim
Nathan Kim
3,837 Points

Thanks, that fixed my problem. Why doesn't console.log get a script tag?

Steven Parker
Steven Parker
231,269 Points

It's already inside a script section. You can have any number of JavaScript lines in one script section.