Front End Technology Articles

Page 298 of 652

What are the Pros and Cons of JavaScript Frameworks?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 486 Views

JavaScript has become the most widely used language in the field of web development in a relatively short span of time. For the last 25 years, the JavaScript frameworks have been driving web developmentIn this article, we are going to elaborate upon the uses of JavaScript frameworks along with their pros and cons. These JavaScript frameworks empower the language to achieve its best with minimal to no configuration. JavaScript can be used as both the frontend and backend technologies.JavaScript FrameworksThese are the frameworks that provide the basic platform for constructing the JavaScript app for developers. This saves the developers most ...

Read More

What are the Important Array Methods in JavaScript?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 235 Views

In this article, we are going to explore different methods provided by Array and their importance in JavaScript. We will learn how to use them and what are their actual use cases with the help of examples.Before moving on to methods, below is the syntax for creating an array in JavaScript −let array = [element1, element2, ...Alternatively, we can also define the array as follows −let array = new Array (element1, elemnet2, ...Now, we will be learning about the different methods in the array:push() method − This method is used for pushing an element into the array. The element will ...

Read More

What are JavaScript Factory Functions?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 13K+ Views

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 these factory functions.These functions do not require the use of the ‘this’ keyword for inner values. Also, they do not need the ‘newnew’ keyword when initiating new objects.Factory functions can contain inner values, methods, and many more. They are just like normal functions but with a specific target i.e. to ...

Read More

What are JavaScript Classes and Proxies?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 247 Views

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 be called in the code even before they are defined. Whereas the class object should be defined before the class object to prevent it from throwing any Reference error.Syntaxclass Classname {    constructor(property1, property2) {       this.property1 = property1;       this.prop erty2 = property2;    } ...

Read More

How to Delete a Linked List in JavaScript?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 294 Views

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 linked using pointers.ExampleIn the below example, we are going to delete the linked list in JavaScript.# index.html    Computed Property           Welcome To Tutorials Point               // Javascript program to delete       // a linked ...

Read More

How to use the "in" operator in JavaScript?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 223 Views

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, else false is returned.Syntaxprop in objectParametersThis function accepts the following parameters as described below −prop − This parameter holds the string or symbol that represents a property name or the array index.object − This object will be checked if it contains the prop or not.Return value − This method will ...

Read More

How to use Static Variables in JavaScript?

Mayank Agarwal
Mayank Agarwal
Updated on 28-Apr-2022 3K+ Views

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 value defined during initialization.The keyword static is similar to the const keyword. It is set at the run time when the initialization takes place and these types of variables have global presence and scope. We can use these static variables anywhere over the script.Note − We can reassign and change ...

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 6K+ Views

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 the video and stopping/pausing the video when the mouse is taken out of that div.For achieving this specific purpose, we will be using JavaScript that will record the events and play/pause the video.ApproachWe will attach a video to our HTML DOM element and then apply the mouse over and mouse ...

Read More

How to Ping a Server using JavaScript?

Mayank Agarwal
Mayank Agarwal
Updated on 27-Apr-2022 8K+ Views

A server ping can be defined as hitting a server and getting a response in return from that server. The idea is to send an echo message that will keep the health check and check whether the server is up and running or not. On sending a PING every server sends a PONG that shows that the server is active. Ping messages are sent by the ICMP (Internet Control Messaging Protocol). The lower the ping time the stronger the connection between the host and the server.ApproachWe can use a JavaScript function for sending the Ping messages to the server. In ...

Read More

How to use JavaScript to replace a portion of string with another value?

Mayank Agarwal
Mayank Agarwal
Updated on 26-Apr-2022 955 Views

In this article, we are going to explore replacing a portion of a string with another value using JavaScript. We can replace string parts in multiple ways. Below are some common methods −replace() methodsplit() methodjoin() methodLet’s discuss the above methods in detail.The replace() MethodThis is an inbuilt method provided by JavaScript that allows the user to replace a part of a string with some another string or a regular expression. However, the original string will remain the same as earlier.Syntaxstring.replace(searchvalue, newvalue)Parameterssearchvalue - It is used for searching a string in the whole string.newvalue - It will replace the searched string.The ...

Read More
Showing 2971–2980 of 6,517 articles
« Prev 1 296 297 298 299 300 652 Next »
Advertisements