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 trialWoodley Fevrius
184 PointsJavascript basics question
Can't seem to figure out this code task. I do the first task fine but every time I do the second one it tells me that now the first one's wrong. Not sure what I'm doing wrong here.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script scr="scripts.js"></script>
</body>
</html>
2 Answers
Steven Parker
231,275 PointsI get a different message.
I pasted your code in for task 2 and got: *"Bummer! You didn't call the alert()
function inside the <script>
tags."
This makes sense as the objective of task 2 is "write a function that will open an alert dialog with the message 'Warning!'", and that hasn't been done yet.
Also, no matter how you spell it, you don't need an attribute in the script
tag for this challenge.
Takudzwa Masvaure
11,250 Points<script scr="scripts.js">alert("Warning!")</script>
Steven Parker
231,275 PointsBut as I said before, you do not need an attribute in the script
tag! And as Robert pointed out, "scr" is not a valid attribute anyway.
Robert Weber
Front End Web Development Techdegree Student 10,340 PointsRobert Weber
Front End Web Development Techdegree Student 10,340 PointsIf you look above the closing body tag, you typed <script scr. It needs to be src.