In this tutorial, you will learn how to swap keys and values in javascript. An object is nothing more than a collection of key-value pairs. This key-value pair is known as the property of an object. Unlike other primitive types, objects are of reference type. You will be surprised to know that primitive value null
In this tutorial, you will learn how to detect NodeList in javascript. A NodeList is a collection of document nodes. It looks like an array and we can iterate over it with the help of the forEach() loop. Other loops such as for, map, etc only work with arrays and to make them work with
In this tutorial, you will learn how to copy and paste text in javascript. Whenever we want to copy a text, we make use of the keyboard shortcut CTR+C and to paste the text, we make use of CTR+V. The same thing can be achieved using a mouse, but most of the users prefer doing
In this tutorial, you will learn how to check if user is online or offline in javascript. As you already know, if you want to perform an activity on any website then you have to be connected to the internet. The moment you connect to the internet, your status is considered to be online and
In this tutorial, you will learn how to check and uncheck all checkboxes using javascript. Whenever we want to provide a limited number of choices to a user, we make use of either radio buttons or checkboxes. Radio buttons are used whenever you want a user to choose only one option out of the given