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 trialSHAWNELL HARRISON
16,282 PointsHelp, I beg of you
Greetings,
I would greatly appreciate any help with this on.THANKS
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script>
document.write("Welcome to JavaScript Basics");
<script>
console.log("Begin program");
document.write("Welcome to JavaScript Basics");
console.log("End program");
</script>
3 Answers
Tarran Prior
Courses Plus Student 3,169 PointsHello Shawnell. :)
You've pretty much nailed it! So kudos! However, look closely. You should notice that you've added an additional <script> tag, which is in between the existing <script> tags. This is what is causing you the error. So, a simple cleanup of lines 10 & 12 and it should be fine.
So your code will look like this...
<!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");
console.log("End program");
</script>
</body>
</html>
Hope this helps! :)
balla kone
23,436 Pointsthe code on your script should be in this way: <!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"); console.log("End program"); </script> </body> </html>
SHAWNELL HARRISON
16,282 PointsThank you so much,I appreciate you!