nodejsnodejsjavascript

# NodeJS

What is the difference between javascript and NodeJS?

Javascript script or ECMA Script is a programming language standard

NodeJS is a runtime interpreter and environment written in C++ which support ECMA Script

JS Engine

Both google chrome and node js both uses v8 javascript engine. Nodejs runtime is written in C++

A function is passed as an argument. aka call-after. Could be synchronous or asynchronous

function processData (callback) {
  fetchData(function (err, data) {
    if (err) {
      console.log("An error has occurred. Abort everything!");
      return callback(err);
    }
    data += 1;
    callback(data);
  });
}

What is IO

"I/O" refers primarily to interaction with the system's disk and network supported by libuv.

libuv
libuv is a multi-platform support library with a focus on asynchronous I/O.
What is v8 javascript engine?

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.

It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

What the difference between nodejs and v8 engine?

v8 - only client side in browser

nodejs allows you to run ECMAScript event at server-side, provices a runtime ecosystem for js independent of browser.

  • Ffeatures like package manager and debugger availble in node ecosystem
Python and nodejs share some similarities

Both are implemented in low level languages like C and C++

  • both provides runtimes and package managers, use RFCs for language development
  • Uses C API

Nodejs Architecture

# Resources

  • or
  • Buy me a coffeeBuy me a coffee