JavaScript JavaScript Basics (Retired) Introducing JavaScript Using the Console

Thaddeus Lorenz
Thaddeus Lorenz
3,434 Points

Saying task 1 not working, I go back to task 1 hit recheck, says it works, then I get to task 2 and says task 1 not work

Task 1 not working, then working, task 2 not working because of task 1

index.html
<!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");
dialog ("End Program");
</script>
</body>
</html>

1 Answer

Steven Parker
Steven Parker
207,972 Points

Syntax errors will cause previous task(s) to fail the re-check.

For task 2, you added a line calling a function named "dialog". But since this is not a valid function name it causes the entire script to fail the checks, and task 1 is always re-tested first.

Hint: take a look at what you wrote for task 1. Maybe the answer for task 2 is something similar?