This Node.js lesson will continue the last lesson where we learned how the LibUV library works internally. We will learn about Event Loop and understand various terms like call stack, callback queue, etc. Let’s start.
Hey everyone, this lesson will continue the last lesson where we learned how the LibUV library works internally. In this lesson, we will learn about Event Loop and understand various terms like call stack, callback queue, etc. Let’s start.
JavaScript is a single-threaded language, which means it can do one thing at a time. This also means that it has a single Call Stack. Now, what is a Call Stack?
A call stack is a data structure that holds information about what line of the function is currently being executed. A call stack is used to keep method calls, and it follows the LIFO (Last In First Out) data structure. By LIFO, we mean a container where the last item entered will be the first to get out. There is only one entry from the top, and if you want to take the item at the end, you will have to take everything on top first. If you’re thinking about a box of Pringles, then you’re absolutely correct.
Let’s understand how this call stack holds method calls:
Callback excallidraw example
The execution will go on like this:
In this Node.js Lesson, we are going to talk about the internals of Nodejs. This article will guide how node js works and how it can handle async tasks. What will happen if ten requests come at once? Will it handle one request and discard the other 9? or will it create a queue and serve each one by one. We will answer all these questions in this and coming lesson. Let's start.
This Edureka Live video on 'How to build CRUD REST API using Node.js'' will help you understand the concept of RESTful APIs and how you can create one using Node.js and Express.js.
This complete 51-part JavaScript tutorial for beginners will teach you everything you need to know to get started with the JavaScript on Node.js. JavaScript Full Course - Beginner's Guide to JavaScript on Node.js
In this Node.js lesson, we will learn about debugging a Node application. We will learn about different ways which can be employed to debug Node application with ease. Here’s a list of things we will cover in this article: JavaScript Debugger, Chrome DevTools, –inspect command, –inspect-brk command, IDE
In this article, we are going to get ourselves familiar with the mechanism and tools to load the C/C++ code dynamically in JavaScript programs using Node’s N-API.