Mayank Agarwal has Published 403 Answers

What are JavaScript Factory Functions?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 13:14:57

A factory function can be defined as a function that creates an object and returns it. It is similar to constructor functions/class functions.The factory function is a very useful tool in JavaScript since it returns the object of any class directly. We can also populate some fixed static values in ... Read More

What are JavaScript Classes and Proxies?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 13:09:10

In this article, we are going to explore Classes and Proxies and the difference between the two.Classes in JavaScript are similar to functions. The only difference is it uses the class keyword instead of the function. Another important difference between the functions and the classes is that the functions can ... Read More

What are Primitive and Non-Primitive Data Types in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 12:25:12

In this article, we are going to explore about different types of data types available in JavaScript and their different usages −Data Types − Every variable in JavaScript has a data type that defines the type of variable it is and what kind of data is being stored in the ... Read More

How to Delete a Linked List in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 12:18:55

In this article, we are going to explore Linked List and how to delete a linked list in JavaScript.A Linked List is a data structure that is used for storing raw data. The Linked List elements are not stored in contiguous memory locations. The elements in a Linked List are ... Read More

JavaScript: How to Find the Middle Element of a Linked List?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 12:09:37

In this article, we are going to explore Linked List and how to find the middle element of a linked list in JavaScript.If there are an even number of elements in the linked list, there will be two middle nodes. We will be only printing the latter element out of both ... Read More

How to use the "in" operator in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 11:59:56

In this article, we are going to explore the 'in' operator and how to use it in JavaScript. The in operator is an inbuilt operator in JavaScript that is used for checking whether a particular property exists in an object or not. It will return true if the property exists, ... Read More

How to use Static Variables in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 11:55:16

The keyword "Static" is used for defining a static method or a static property of a class. The benefit of a static method is that we do not need to create an instance or object of the class. It does not have multiple values. It will have a single static ... Read More

How to use Global Variables in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 11:49:51

In this article, we are going to explore global variables and how to use them in JavaScript. But before moving on to using them, let’s see how to declare a variable.A variable can be either declared as a global variable or a local variable. Each variable has a scope associated ... Read More

How to transform JSON text into a JavaScript object?

Mayank Agarwal

Mayank Agarwal

Updated on 28-Apr-2022 11:29:00

In this article, we are going to explore a way to convert the JSON text into a JavaScript object. JSON, also known as JavaScript Object Notation, is a lightweight data-interchange format that is used for exchanging data over web browsers. JSON is derived from the JavaScript programming language but can ... Read More

How to use JavaScript to play a video on Mouse Hover and pause on Mouseout?

Mayank Agarwal

Mayank Agarwal

Updated on 27-Apr-2022 09:53:24

In this article, we will be exploring the event listeners and how to use them for pausing and playing a video. We will be using the mouse over and the mouseout events to control the video.The main element of this article includes playing the video whenever the mouse hovers over ... Read More

Advertisements