The web browsers and Nodejs run javascript scripts. The main difference is that Nodejs is a server-side framework and executes javascript code in a server and not in the environment of a web browser. There isn’t any concept like Nodejs file, there are only scripts that run on the client-side or the sever-side.
Moreover, JavaScript is a language and Nodejs is a framework of JavaScript. All browsers have JavaScript engines that run the web pages like Spidermonkey for Firefox, V8 for Chrome.
NodeJs is simply the V8 engine bundled with some libraries to do I/O and networking.
Want to be a full stack developer? Check out the full stack developer course from Intellipaat.