Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

newbie: JavaScript VS Node JS [closed]

If JavaScript files are loaded and executed in the browser how does the server know when the file is a node js file, therefore to execute on the server?

like image 781
Max Avatar asked Jul 17 '16 18:07

Max


People also ask

Should I learn JavaScript first before Node JS?

To learn NodeJS the most important thing you should know is JavaScript.

Which is better JavaScript or Node JS?

As a result, writing JavaScript is incredibly easy, and any working environment is similar to a complete browser. Node. js, on the other hand, only enables the V8 engine. Written JavaScript code, on the other hand, can run in any context, regardless of whether the V8 engine is supported.

Is Node JS easy after learning JavaScript?

Node is written in JavaScript. JavaScript is one of the most popular programming languages and nearly every developer is familiar with it. Therefore, learning Node requires less effort and time, even for a junior JavaScript programmer.

Is it worth learning Node JS in 2022?

Node. js development has become very popular over the last four years and continues to stand the competition in 2022 making startups worldwide choose it over other available options.


1 Answers

JavaScript is a language. node.js is not a language but an "environement/set of software" that runs normal JavaScript.

All browsers have JavaScript engines that run the JavaScript of web pages (Spidermonkey for Firefox, V8 for Chrome).

Node.js is simply the V8 engine bundled with some libraries to do I/O and networking, so that you can use JavaScript outside of the browser (e.g, to create backend services).

like image 148
Adib Aroui Avatar answered Oct 03 '22 12:10

Adib Aroui