I simply create a script.js and connect it with index.html
In script.js i write console("Hello World from js");
I want to see the console statement Hello World from js in the browser console. So I go to Console, RC>Inspect>Console,
Browser Console Output
There i get an errorenter image description here
Could anybody help me with this issue?
I want to see a clear output Hello World from js in Browser Console
2
Answers
I think you meant to write
console.log('hello world')
.You cannot use just
console
, you need to specify a function like log, warn, error, etc.