skip to Main Content

I’m trying to start studying node js.
after install node js(it was LTS) the console shows version well
enter image description here

and then i tried a very simple code in VS code just see how it works
but the console shows no result. I expected to see hello world from console.log code
enter image description here

function hello(name) {
  console.log(" Hello!" + name );
}

hello("World");

I don’t know why it’s not working… and also it shows no error code too

2

Answers


  1. Chosen as BEST ANSWER

    This was very simple problem... all the directory name should be written in ENG...


  2. I think you are omitting the .js

    so like

    try

    node hello.js

    also exit repl if you haven’t already

    or you haven’t saved your file? Happens to me a lot

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search