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!
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
Franchesca Quezada256 Points
Challenge questions: Inside the script tags, write a function that will open an alert dialog with the message 'Warning!'
This is the first time I've ever written code. I've watched the video for these questions over and over and can't seem to get this to work. I always get the first part right, but when I add the second script tag inside, it stops working. What am I doing wrong? Please help! Thanks!
You have the right code, you just also have wrong code.
Challenges are pretty picky, and will often fail you if you do anything beyond the exact thing they tell you to do.
In the first task you are asked to create a pair of script tags, you are not asked to link to a file using those tags. And in the second task you are asked to put code within those tags, not to add any new script tags.
If you remove the two script tags where you link to js files and just keep the last of your tags like this:
Then your code will be accepted.