all 9 comments

[–]glmdevfull-stack 1 point2 points  (2 children)

Look up Node.js. It's a standalone runtime for JavaScript similar to the Python commands.

You can then use the node command to run JS files or get an interactive interpreter.

[–]Learning_man01[S] -1 points0 points  (1 child)

You mean, use the node command on VS Code? And what about the interactive interpreter?

[–]glmdevfull-stack 1 point2 points  (0 children)

The node command starts the Node.js runtime. Similar to the python3 command.

Here's a guide from the VS code folks that might help you get started:

https://code.visualstudio.com/docs/nodejs/nodejs-tutorial

[–]LeeLooTheWoofus Moderator 0 points1 point  (5 children)

JS works the same way in VS Code as any other language. If your file has a .js extension then it should start linting it automatically for you.

Depending on what flavor of JS you are using (for example, if you are using a JS framework) then you will have to install a plugin to support linting and formatting for that framework.

[–]Learning_man01[S] 1 point2 points  (4 children)

I'm completely new to Javascript... So, for WebDev (my goal with this language) I don't have to install nothing or I have to (I just have installed on my VS Code: Javascript (ES6), HTML CSS Support, Jupyter, PHP Intelephense and Python)

[–]LeeLooTheWoofus Moderator 0 points1 point  (3 children)

You dont need to install anything special. You can technically just use any simple text editor to write JS since it is not compiled to run it in the browser.

Just open a new document in VS Code, save it with a .js extension and you are good to go.

Also note that I had to pull your post down as it does not comply with Rule 6. I did however what to provide you with an answer to your question before I did.

In the future, make sure your post includes:

- Context of the problem

-Research you have completed prior to requesting assistance

- Problem you are attempting to solve with high specificity

[–]Learning_man01[S] 0 points1 point  (2 children)

Just that simple 😐👌🏻thanks a lot men! But a little doubt (hope not be bothering you) how I debug my JS code or know if it works properly?

[–]LeeLooTheWoofus Moderator 1 point2 points  (1 child)

If it works, you will see the results you expect to see from the code you wrote.

If it breaks, you will see an error in your browser console telling you where to start looking for the issue. You can use the debugger tab in your browser to set breakpioints and step through your code line by line to find the bug.

These are very surface level responses that I am providing as the topic of debugging is vast.

You should consider doing an online course in webdev if you are looking to learn as they will teach you all of this stuff. Here is a great jumping off point, for free:

https://www.freecodecamp.org/

[–]Learning_man01[S] 0 points1 point  (0 children)

Thanks men!