Found 6685 Articles for Javascript

JavaScript Program for Clockwise rotation of Linked List

Prabhdeep Singh
Updated on 24-Mar-2023 10:19:50

247 Views

The basic structure of a Linked List in JavaScript can be created using the class in JavaScript and then the movement of the nodes from one position to another can be done for rotation. In this article, we will learn how to rotate a linked list in a clockwise manner in JavaScript programming language. We will see the code for understating the concepts in deep. In the given problem we have given a linked list and we have to rotate it in a clockwise manner. This means, we have to put the last element in first place in every move ... Read More

Explain Implement a Memoization Helper Function

Prabhdeep Singh
Updated on 17-Mar-2023 13:53:03

261 Views

Memoization is a helper function, or we can say a technique for improving the efficiency of a program by Keeping track of the values that the function has already calculated in the past. In this article, we will discuss the Memoization Helper function with different examples and discuss all the examples in detail so that we can get a better understanding of Memoization. Now let’s discuss the Memoization helper function in the deep in the below section and also see their implementation with an explanation. Introduction to Memoization Helper Function Memoization is a technique of programming that is used to ... Read More

Explain Different kinds of Generators in JavaScript

Prabhdeep Singh
Updated on 17-Mar-2023 13:45:24

104 Views

As we know JavaScript is a lightweight programming language in which generators were introduced in ECMAScript 2015. A generator is a process that has many output values and may be stopped and started. In JavaScript, a generator is made up of a generator function that produces an iterable Generator object. In this article, we are going to discuss the generators in JavaScript and also the different types of generators in JavaScript with syntax and examples in detail. Introduction to Generators in JavaScript The generator's function is as same as the regular function but there is a bit of difference in ... Read More

Explain Chosen and Select2 with Examples

Prabhdeep Singh
Updated on 17-Mar-2023 13:28:21

702 Views

There are two jQuery plugins that can we use to style the select boxes that are Select2 and Chosen. Both the plugins Select2 and Chosen are improving the look of the selected boxes and enhancing the behavior of the boxes which leads to the make them user-friendly. Also, both of these plugins can be used for multiple selected boxes as well as single selected boxes. Chosen JavaScript plugin that creates the select boxes user-friendly that is chosen. Chosen is available in both the prototype and JQuery versions. Features of the Chosen User-friendly Your users won't have to slog through a ... Read More

How to change the element id using jQuery?

Gungi Mahesh
Updated on 17-Mar-2023 13:19:19

6K+ Views

jQuery is one of the JavaScript libraries which is fast, small, and feature-rich. It is used to perform event handling, animation, etc. It is a combination of versatility and extensibility. jQuery is used to simplify the AJAX call and DOM manipulation. Using jQuery, we can make a webpage interactive by responding to a mouse click event. jQuery includes the features like Events, Effects, animations, Ajax, JSON parsing, Cross-browser support, and extensibility. It distributes as a single JavaScript file which defines all of its interfaces like DOM, Events, and the Ajax functions. jQuery consists of two functions, one function is static ... Read More

How to change the href value of <a> tag after clicking on button using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:17:17

7K+ Views

The href attribute specifies the link’s destination, which can be a URL or an anchor point within the same document. Changing the attribute value of href which allows us to dynamically update the destination of the link, which can be useful in a variety of situations. Generally, the tag is used to create a hyperlink in HTML. stands for anchor tag, and it is used to link the other web pages or to specify the exact locations within the same page. On the other side, the href attribute is used to specify the link’s destination, which can be ... Read More

How to change the font-weight of a text using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:12:46

800 Views

Using JavaScript is one of the most famous ways to change the font-weight of any text on your webpage. We can build interactive applications using JavaScript with HTML elements. Font weight refers to the boldness or thinness of the characters. In this article, we will see how we can change the font-weight of a text using JavaScript. Using the Style fontWeight Property Let us see how can we change the font weight of a single element, such as a paragraph or a heading. To do this, we will use the ‘style.fontWeight’ property of the element. This property is an object ... Read More

How to change cursor to waiting state in JavaScript/jQuery?

Gungi Mahesh
Updated on 17-Mar-2023 13:09:46

867 Views

We can use onmouseover, onmouseout events to set or change the cursor into the state of waiting. In JavaScript, we have different types of mouse events which performs the different functionalities on mouse. Let us see some of the mouse events. onmousedown − These event is occurred when a mouse button is pressed over an HTML element onmouseenter − It occurs when a pointer is moved out of an element onmousemove − These event is occurred when the pointer is moving over an HTML element onmouseout − It occurs when the pointer leaves the element onmouseover − When the ... Read More

How to change font style using drop-down list in JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:03:11

5K+ Views

We can use the style fontFamily property to change font style using drop-down list in JavaScript. To make the font change effective using the drop-down list, we can use onchange event when an option is selected in the drop down list. Before we move further, let us know in detail about the drop-down list. A drop-down list is a switchable menu which enables the user to select the one item from a various option. These options can be defined using the HTML code, which are connected to a function. These functions are triggered and starts operating whenever you click or ... Read More

How to change Input box borders after filling the box using JavaScript?

Gungi Mahesh
Updated on 17-Mar-2023 13:01:21

2K+ Views

The style.border property is used to change the element’s border, and it returns the three border-bottom properties, i.e., border-color, border-style, and border-width of the element. It is one of the HTML Style Object properties. We use onchange event to make changes effective after filling the box. The onchange is one of the JavaScript attribute and it occurs when the value of an HTML element is changed. It also works with the radio buttons and checkboxes, when the checked state is changed. The onchange event can also work with the HTML element. The onchange event is quite similar to the ... Read More

Advertisements