The following list provides some of the Important Concepts in NodeJS that every programmer should know.
- Modules in NodeJS
- NodeJS File System
- Node Package Manager (NPM)
- Asynchronous I/O (Non-Blocking I/O)
Brief Introduction of Important Concepts in NodeJS
The following section provides a brief introduction of the above-mentioned concepts.
In fact, NodeJS offers lots of built-in functionality that we can use in our code. Actually these are a set of libraries available in the form of modules.
File System in NodeJS
In fact, the file system in NodeJS is available as a module called ‘fs’. It allows us to read, write and modify the files.
Similarly, NodeJS has a module called as ‘events’ that enable us to do event-driven programming.
Node Package Manager (NPM)
In order to download the packages available in NodeJS, we use Node Package Manager (NPM).
Basically, a callback function is a function that we can pass as an argument to another function. Once, we pass a function as callback, it runs within the function to which it is passed.
Asynchronous I/O in NodeJS
Promises in NodeJS
Since, we can use asynchronous function calls in NodeJS, so we also need a placeholder for a future return value. Hence, a Promise in NodeJS serves the purpose of the placeholder that will accommodate the result of the asynchronous task. Basically, a Promise is an object that has two properties – state and result.
- Dot Net Framework
- Power Bi
- Scratch 3.0
- Web Designing