JavaScript JavaScript Basics Introducing JavaScript Using the Console

SHAWNELL HARRISON
SHAWNELL HARRISON
8,496 Points

Help, I beg of you

Greetings,

I would greatly appreciate any help with this on.THANKS

index.html
<!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
PRO
Tarran Prior
Pro Student 3,155 Points

Hello 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
balla kone
21,009 Points

the 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
SHAWNELL HARRISON
8,496 Points

Thank you so much,I appreciate you!