Node.js allows you to use different modules in our application. When using different modules we might have come across two keywords: require and import, both of which are used to import the modules and packages into our project. In this article, we will ... more
So you have covered the basics of JavaScript what now? Well with the power of Tensorflow.js, you can now take your JS skills to the next level with Machine Learning. Machine Learning is the use of computer systems that are able to learn and adapt without ... more
NPM is the default package manager for Node.js. It’s been the sidekick for Node.js for the past 10 years and comes pre-bundled with it. At the time of writing, npm is the world’s largest software registry with over 800,000 packages published and used ... more
So you’ve followed through a proper tutorial and built an app in Node and run it on your computer, but you want it to run 24×7 and can’t have the computer open that long! The problem is your computer is even not that powerful to run just a simple app ... more
The Node Package Manager (NPM) is the default package manager for Node.js. NPM provides us with many commands to install, update and manage our dependencies or packages. As it allows us to install node modules from the npm registry, it also allows us ... more
Node.js is full of utilities and tools that can make the development of our projects easier. One such tool is NPM. NPM has been around for 10 years and comes pre-installed with Node.js. NPM is more popularly known for being the default package manager ... more
By default, all Node.js project uses NPM or Node Package Manager as their default package manager. We can use the command npm install or npm i followed by the package name and some options to install any dependency package from the node package manager. ... more
Node.js has an event loop that takes care of the flow of execution of the tasks, and when a task gets executed it fires the corresponding event to perform a specific action. Creating a Node.js program using multiple events makes the program run synchronously ... more
We know that JavaScript code runs in a single thread meaning that our code can perform only one task at a time. Similarly, Node.js also runs on a single thread and uses a single event loop that runs on the same thread. However, under the hood, Node.js ... more
NodeJS is a JavaScript runtime built on Chrome’s V8 JavaScript engine, which allows developers to write server-side JavaScript code whereas Ruby on Rails, is a web application framework written in the Ruby programming language. NodeJS and Ruby On Rails ... more
Traditional REST API style can get cumbersome when the complexity of APIs increases. GraphQL provides a modern approach to client-server communication and helps the development of web applications in a more efficient way. In this post, we’ll learn what ... more
Node.js is an open-source cross-platform JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses the process model instead of the traditional web server model, which makes it suṀper useful for web development. It allows developers to use ... more
JavaScript has a Date object that provides information regarding the date and time. This information can be used for different purposes such as getting the current time, comparing dates, formatting dates, reminders, etc. JavaScript Date objects represent ... more
The scope is the most fundamental concept in programming, it defines the current context of a program, i.e., where the variables can be accessed. For Example, a variable defined inside a function can’t access outside it. So its scope is Function scope ... more
JavaScript is different from other programming languages in terms of data types, it is dynamically typed, allows changing the data type of a variable during runtime, it uses the concept of loose equality, i.e, it compares value regardless of what data ... more
JavaScript uses objects everywhere, it is a fundamental part of writing modern JavaScript code. JavaScript only has a few primitive data types(i.e. string, boolean, null and undefined, etc), and all the remaining data types are considered objects. Objects ... more
Node.js was developed by Ryan Dahl in 2009. It is a JavaScript runtime built upon the V8 engine that uses Javascript for creating the server side. The server created using Node.js can interact with the operating system and file system. It can perform ... more
The JavaScript eval() method can execute a statement, expression, or a group of statements and return its completion value if it exists. JavaScript eval() Method The eval() is a method of the JavaScript global object. This method takes a string as an ... more
In programming, conditional statements are used for making decisions based on different conditions. Given certain conditions, different courses of action are taken based on those determinants. A programmer defines those conditions and if their boolean ... more
Switch case came in handy when a huge amount of choices are present in a problem and repeated if-else statements make the code lengthy and difficult to read. In JavaScript, we can use a switch case to branch out in multiple directions based on different ... more
JavaScript is different from other programming languages in terms of data types, it is dynamically typed, allows changing the data type of a variable during runtime, it uses the concept of loose equality, i.e, it compares value regardless of what data ... more
The strict mode in JavaScript helps us to write secure code by detecting accidental errors and bugs in the code. It produced the visible mistakes hidden in JavaScript, by default JavaScript just failed silently without showing the errors. In this tutorial, ... more
Error is a term referring to an unexceptional affair that creates trouble in the expected execution. The errors can occur due to many reasons such as access not existing variables, invalid syntax, data type mismatch, etc. These errors are essential to ... more
A module is an application’s component that can hold the partial programs to provide some custom functionality. It decreases the clatter in the code. Also, it’s a bad approach to write the entire code for a program in a single file, so it is suggested ... more
An Array in JavaScript can contain multiple values. These values can occur multiple times and end up increasing unnecessary space. This tutorial will cover the different methods to remove duplicate values from an Array in JavaScript. Before going further, ... more
In JavaScript, Array is a variable that can store multiple types of data together, an array can have a number, a string, a boolean, object, etc. There is no fixed data type and length of an array in JavaScript which makes it super flexible and easy to ... more
Generating Random Numbers can be useful for multiple purposes. This tutorial provides a complete guide to generating random numbers in JavaScript. Before we dive deep into the process, let’s see some of the common use cases for generating random numbers. ... more
JSON stands for JavaScript Object Notation used to structure data based on JavaScript object syntax. JSON is small in size making it fast to transfer between server and client for transmission of information. JSON is based on JavaScript but due to its ... more
Nowadays everyone has to use WhatsApp whether they are in a corporate background or just for communicating between friends and family. The app has seen numbers of users of over 2 billion in a month. In India alone, more than 340 million users are active ... more
A MongoDB database has multiple collections. These collections can store millions of documents(data in MongoDB is called a document) and we can fetch all the data from a collection by performing a read operation using different methods like the collection.find(). ... more