Front End Technology Articles

Page 324 of 652

How to set the image to be used as a border with JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 1K+ Views

In this tutorial, we will learn how to set the image to be used as a border with JavaScript. The outline of an HTML element is called the border. The 'border-image' CSS property is used to set an image as the border around an element. It is a shorthand property for: border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat. To set the image to be used as a border with JavaScript we have different ways − Using the style.borderImage Property Using the style.setProperty Method Using the style.borderImage Property An element's ...

Read More

How can I escape HTML special chars in JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 10K+ Views

HTML contains special characters such as '', '/' and many more such as single and double quotes. These special characters are used for HTML tags, such as '' are used to close HTML tags. This tutorial teaches us to escape HTML special characters in JavaScript. Now, the question is what if we want to use these characters inside the HTML content? If we use special characters normally in HTML content, it considers them as opening or closing HTML tags and produces an unknown error. For example, we need to render the below string to the browser: ...

Read More

How to set the direction of the flexible items with JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 1K+ Views

In this tutorial, we will learn how to set the direction of the flexible items with JavaScript. The direction of the flexible items can be set using the flex-direction property of CSS. It defines how the flexible items will be placed in the flex container. Its default value is set to 'row', but it can have other values like 'column', 'row-reverse' etc. To set the direction of the flexible items with JavaScript, we have multiple ways, and in this tutorial, we will discuss two of them − Using the style.flexDirection Property ...

Read More

Set how the item will shrink relative to the rest with JavaScript?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 368 Views

In this tutorial, let us look at the way to set how much the item will shrink relative to the rest of the elements in JavaScript. To set item shrink relative to the rest of the elements, we can utilize JavaScript's flexShrink property. Let's take a quick look at this. Using the Style flexShrink Property The flexShrink property specifies how much a flex item will shrink according to the other items in the same container. The element must be flexible for the flexShrink property to function. The property's value functions as a ratio. For instance, if ...

Read More

Stack Data Structure in Javascript

Sai Teja Kotha
Sai Teja Kotha
Updated on 15-Mar-2026 967 Views

In this article, we are going to discuss the stack data structure in JavaScript. A stack is an Abstract Data Type (ADT), commonly used in most programming languages. It is named stack as it behaves like a real-world stack, for example – a deck of cards or a pile of plates, etc. Element 1 (Top) Element 2 Element 3 Element 4 (Bottom) LIFO ...

Read More

Queue Data Structure in Javascript

Sai Teja Kotha
Sai Teja Kotha
Updated on 15-Mar-2026 733 Views

In this article, we are going to discuss the queue data structure in JavaScript. It is a linear data structure where the enqueue and dequeue of elements follow the FIFO (first in first out) principle. The queue is open at both ends - one end is used to insert data (enqueue) and the other is used to remove data (dequeue). We use two pointers: rear for insertion and front for removal. A real-world example of the queue can be a single-lane one-way road, where the vehicle that enters first, exits first. Other examples include printer job queues, task scheduling, ...

Read More

The Priority Queue in Javascript

Sai Teja Kotha
Sai Teja Kotha
Updated on 15-Mar-2026 3K+ Views

In this article, we are going to discuss the priority queue data structure in JavaScript. A priority queue is an abstract data type (ADT) which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue. How Priority Queue Works Priority queues maintain elements in sorted order based on their priority values. Lower priority ...

Read More

Types of Linked List in Javascript

Sai Teja Kotha
Sai Teja Kotha
Updated on 15-Mar-2026 2K+ Views

A linked list is a dynamic data structure where elements (nodes) are connected through pointers rather than stored in contiguous memory locations. Unlike arrays, linked lists allow efficient insertion and deletion without memory waste, as memory is allocated as needed. JavaScript supports three main types of linked lists: Singly Linked List − Navigation is forward-only through next pointers Doubly Linked List − Bidirectional navigation with both next and previous pointers Circular Linked List − The last node connects back to the first node, forming a loop ...

Read More

Doubly linked lists in Javascript

Sai Teja Kotha
Sai Teja Kotha
Updated on 15-Mar-2026 2K+ Views

In this article, we are going to discuss a Doubly Linked List Class data structure in JavaScript. This is a linear data structure. Doubly linked lists are almost the same as a singly linked list in all operations, we just need to keep track of one extra link per node. In singly linked lists, we just had next links, in doubly linked lists, we have 2 links, next and prev. Structure of Doubly Linked List Doubly linked lists are represented as: ...

Read More

Hash Table Data Structure in Javascript

Samual Sam
Samual Sam
Updated on 15-Mar-2026 2K+ Views

Hash Table is a data structure which stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its own unique index value. Access to data becomes very fast if we know the index of the desired data. Thus, it becomes a data structure in which insertion and search operations are very fast irrespective of the size of the data. Hash Table uses an array as a storage medium and uses the hash technique to generate an index where an element is to be inserted or is to ...

Read More
Showing 3231–3240 of 6,519 articles
« Prev 1 322 323 324 325 326 652 Next »
Advertisements