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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Anna Bazileeva](https://secure.gravatar.com/avatar/a8f2b0ba460f61f170c12607532510ad?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Anna Bazileeva
1,249 Pointschallenge task 2
The error message: Bummer: Make sure you print 'Begin program' in the console
What wrong with my code?
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Basics</title>
</head>
<body>
<h1>🔥BOOM!🔥</h1>
<script src="app.js"></script>
</body>
</html>
alert("Warning! This message will self-destruct in");
alert("3");
alert("2");
alert("1");
document.querySelector('h1').textContent = '🔥BOOM!🔥';
console.log("Message destroyed!");
console.log("Begin program");
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsYour program is printing many things not asked for by the instructions, and it also requires user interaction (several times) before it accomplishes the objective. Remove all the extra alerting and logging to pass task 2.
For best results with the challenges, always do only what the instructions ask for to avoid confusing the evaluator.
Experiment as you like in the workspace exercises.
Anna Bazileeva
1,249 PointsAnna Bazileeva
1,249 PointsThank you. I found my mistake. The instruction said that I should add my code to the previous task. I didn't clear understand that I don't need clear the previous code, but should use // for comment previous code.
Steven Parker
230,688 PointsSteven Parker
230,688 PointsAnna Bazileeva — You won't ever need to copy code from the workspace projects into challenges. They may have similar objectives to the exercises, but they won't ever be exactly the same or require any preliminary code other than what they give you. When they say "previous task", they are only talking about the tasks of the challenge itself (for example, this one has 4).
Glad I could help. You can mark a question solved by choosing a "best answer".
And happy coding!