Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
210,152 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
210,152 Points

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