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 trialKamarky Jimenez
6,767 PointsCan't get second java command from video to run.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JavaScript Basics</title> <link href="css/style.css" rel="stylesheet"> <script src="js/script.js"></script> </head> <body> <main> <h1>Hello, JavaScript!</h1> <script>alert(“hello another message from html file”);</script> </main> </body> </html>
1 Answer
Peter Vann
36,427 PointsHi Kamarky!
I did some testing. It seems that you are using unusual quotes (not normal double quotes) and created an "unexpected token" error.
You are using:
alert(“hello another message from html file” ); // “ ”
And not:
alert("hello another message from html file"); // " "
(See, they even print out different in the JS markup!?!)
Also, I would put the alert script outside main, just before the closing body tag...
I hope that helps.
Stay safe and happy coding!