Fresher need help

Hi as code is correct, how can be displayed in console. kindly refer screenshot and help me out.

Hi,
I have no idea and I rather don’t think (yet I’m not sure) you can load js directly in the browser console. I don’t know node.js much neither but it could be an option (overkill in this scenario, should you ask me).
I would simply copy paste or create a dummy HTML page to execute the code.

Regards.

It is also likely there is a VSCode extension that will allow you to run JavaScript in the IDE.

Using my best skill of all I found that.

1st solution is what I propose. Easy to setup and needs no extra software than the browser itself.

2nd solution is using Node.js and it seems pretty simple actually. If you have it installed you may give it a try.

3rd solution is a VS Code extension but it uses Node.js anyways.

Basically this is just a sum up of what have been told to this point. So it is confirmed. I cannot find a way to load JS file directly.

Tried Drag and drop on console. It is forbidden. And in browser itself it displays raw content but do not execute.

1 Like

Thank you so much for all your suggestion. got resolved