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 trialfatimah Alabbad
1,972 PointsI did everything as instructed but the console did not appear , what's wrong with my cod ?
here is the code I wrote : https://w.trhou.se/bt7b6e5at
fatimah Alabbad
1,972 Pointsconsole.log("Begin program");
alert("Help me fix this program!");
alert("Can you get this message to appear?");
document.write("<h2>My first JavaScript program</h2>");
document.write("<p>I'm practicing 'debugging'.</p>");
console.log("end program");
2 Answers
Daniel Rivers
2,931 PointsCan you show me what is outputted in the browser?
You should only see
Begin program end program
This is because document.write doesn't output to browser consoles.
fatimah Alabbad
1,972 PointsI fixed it ^^. I was using chrome canary and change it to chrome and it appeared. maybe their was some catches or something, but thanks anyway.
Daniel Rivers
2,931 PointsYou're welcome
Daniel Rivers
2,931 PointsYour code is absolutely fine. When you preview (using the eye icon in the corner) it loads in new browser tab.
If you right click on the webpage that loads and select Inspect, you will see the messages in the console of the browsers dev tools.
Hope this helps
fatimah Alabbad
1,972 PointsI opened the browser before and all the other codes appeared and the console.log did not appear in the console area
Daniel Rivers
2,931 PointsDaniel Rivers
2,931 PointsCan't view your code, could you post here?