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?

  • 2
    Node 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))
  • 2
    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.
  • 0
    Thanks for your responses! 🙏
  • 1
    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.
  • 0
    @Codex404 thanks, I'm familiar with these aspects of both.
Your Job Suck?
Get a Better Job
Add Comment