My code doesnt work in the console

You need to open the console in the browser. Right-click in browser > Inspect. Then you would see a console.

the console is in the background it still is not showing anything

can you show the console?

Press F12 in the browser and find console, should be there

to have that work you need to have the js file linked to the html file, and open the browser console to see the value printed

edit: now I see you have opeend the console. What’s written in the html file? that’s what will determine if the js file is executed or not

1 Like

you need to link the javascript file to the html, otherwise it is not executed

1 Like