Posts from JavaScript

How to remove blank lines from a .txt file in Node.js

By Abid Hassan

Removing blank lines from a .txt file inĀ  Node.Js is easy. Let’s Understand the concept, First of all, we have to access the .txt file next we need to break the paragraph or.... Read More

How to extract values from nested JSON

By Abid Hassan

In this tutorial, you will learn how to extract values from nested JSON using various methods in Node.js. These methods include dot notation, square bracket notation, and object de.... Read More

Get the Operating system name or Platform name in NodeJS

By Abid Hassan

Getting the operating system platform is very easy. In NodeJS at first, we just have to import a module ("os"), which is a built-in module of NodeJs that provides several methods r.... Read More

The Best Practices for JavaScript Security

By Diksha Jain

Introduction to JavaScript Security In September 2018, British Airways, one of the world’s leading airlines, experienced a severe cyber attack. The company’s website wa.... Read More

Replace an object in an array with another object in JavaScript

By Samim

In this tutorial, I will show how you can replace an object in an array with another object in JavaScript. Here are some methods below to replace an object in an array with another.... Read More

Merge or flatten an array of arrays in JavaScript

By Samim

In this tutorial, I will saw you how to merge or flatten an array of arrays. An array of arrays basically means an array that contains multiple arrays. These are some methods below.... Read More

Separate characters, special characters and numbers from a string in JavaScript

By Samim

In this tutorial, We will see how to separate characters, special characters and numbers from a string in JavaScript. We can use regular expressions for this purpose. Using match().... Read More

Declare optional function parameters in JavaScript

By Samim

In this tutorial, we will learn how to declare optional function parameters in JavaScript during defining the function. The optional function parameters can be defined by assigning.... Read More