Solution 1 :

Because you use it in wrong way

console.log("hello")

not

console.log = "hello"

Problem :

I am using vscode to learn javascript but for some reason whenevr i run the code console.log = ('hello world'); in the .js file or using script tag in the body of the html file nothing shows up in chrome developer console section. But if i use alert in .js or html the normal display is there.

Can anyone help me resolve this issue? Thanks!

enter image description here

By