Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
rui7257607yNode is actual server and handles request and response it is written in a javascript file...while the javascript for front end(client side) is <script src> </script> where this file handles interaction when you click or do something with the web page( sends request to server(Node))
-
It's all about where the code is run. 'Frontend' Javascript is run in a browser and has access to the DOM and window. Javascript run by Node has access to things like the filesystem but obviously can't access a DOM or window of any kind. Syntactically they're identical.
-
Sorry to make it a bit more complicated (dont continue if you think it might confuse you).
Javascript is a scripting language which can run in a browser or with Node.
NodeJS is a javascript interpreter for a client. Usually its used for making small programs or servers. In combination with Electron one can make software with a GUI with javascript. VS code, Discord, Slack and Atom are examples of programs made with Javascript and Node.
Related Rants
Even though I'm learning Node.js, I'm still a little confused about the distinction between Node and frontend JavaScript.
Where does frontend JavaScript end, and Node begin? What are the practical distinctions between the two?
question
nodejs
javascript
frontend vs backend
front-end
node.js