Activating console.log on courses?

I apologize if this question is ridiculously simple but how do I get console.log statements to actually appear on the console that’s displayed during FCC courses? I’m working on one of the certification projects and would like to print things to the console, but it doesn’t respond when I type a console.log statement.

Can you show us the code you are trying to use the console.log in

Sorry, I should have specified. I’ve tried to print variables and such, but I can’t even get a generic console.log(“xyz”); to register on the console.

did you link the javascript file to the html file?

I think they’re linked. I included a script tag at the end of the body, also made the entire content of the page disappear somehow while editing JS lol.

does the script tag has the src attribute that points to the js file?

Here’s the HTML

that looks like it should be linked. …

I’m actually having 0 luck getting any function from JS to interact with the preview. I’m only using that HTML, I’ve deleted CSS entirely, and I’ve copied online solutions directly into JS, still no interaction

if you press Run the tests then it will run for sure

for the link tag, you have src value ./script.js instead of script.js. also same for the css link.

Welcome to the forum @pclumley97

Try removing the second forward slash from the src attribute value.


Happy coding

1 Like