I just started self-learning javascript like half an hour ago and I already got my first runtime error (yay me!)

I simply wrote:

console.log('Hello World!');

and then I tried to run it on cmd i wrote:


Then it gave me the runtime error ‘console’ is undefined, what does it mean?


you can’t just run JS code in CMD. If you want to do this, you need to learn nodeJS


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.