Found 9054 Articles for Front End Technology

How to sort a set in JavaScript?

Abhishek
Updated on 20-Nov-2023 16:51:32

124 Views

A set is also a data structure that is almost similar to the map data structure. The only difference between them is that map stores the elements in the form of key-value pair, while set does not it only stores a single value in the same order as it was inserted. It can also store primitive data types as well as objects as map does. A set contains all the elements in the same order as they are inserted. But, we can sort a set in any order whether in increasing or decreasing order of elements using the sort() method ... Read More

How to sort a map in JavaScript?

Abhishek
Updated on 20-Nov-2023 16:44:53

208 Views

In JavaScript, Map is a type of data structure that stores the values in the form of key value pairs. It can store all types of data types, whether they are primitive or JavaScript objects. It stores the elements in the same order in which they are inserted, hence, when we iterate through its elements, it prints the elements in the same order as we have stored them. As we have discussed that the order of elements stored in a Map is same as we insert elements in that Map. But, we can also sort the elements of the map ... Read More

How to sort a list alphabetically using jQuery?

Abhishek
Updated on 21-Nov-2023 09:37:08

178 Views

jQuery is a JavaScript library that works on the principle of write less, do more. In jQuery, the syntaxes that are longer and take more time to write are reduced, and alternate methods are introduced to use them in short form. In this article, we are going to learn about the method of sorting a list in alphabetical order using jQuery. Let us discuss some common methods of jQuery which we will use in the code example to sort the list in alphabetical order. text() method − The text method is used to get and set the text of ... Read More

How to solve the issue that arise while using performance.now() method in JavaScript?

Abhishek
Updated on 20-Nov-2023 16:38:32

75 Views

The performance.now() method is used to calculate the performance of the code written by any programmer or the coder. The performance.now() method will return a numerical value that will be the time taken by the written code to execute. The value returned by this method may vary every time we execute the code even for the same code. In today’s time, everyone wants to write the fast loading and the efficient code for a problem that can work on every parameter and fastest of all other solutions. So, to measure the efficiency and to make sure that the written code ... Read More

How to set the size of specific flex-item using CSS?

Abhishek
Updated on 20-Nov-2023 16:25:43

62 Views

In CSS, we can create our own flexbox using some flex properties provided by the CSS. The CSS flexbox is used to create the responsive layout for the mobile and other small screen devices to arrange the layout by adjusting their sizes for those screen sizes. To create a flexbox for the web page to manage items and their sizes, we are allowed to use the display: flex; property and then we can use the flex properties which are associated with this property to arrange the items according to the striking device width. Let us now discuss and understand the ... Read More

How to set the order of flexible items using CSS?

Abhishek
Updated on 20-Nov-2023 15:29:51

41 Views

Generally, all the HTML elements renders on the web page in the same order in which they are defined in the HTML document. But we can change the order of any element using the order property of CSS. We can use the order property on the elements which are defined inside a flexbox or an element that contains the display: flex; property. Once we used the display flex on the parent element, we can use the order property to change the order of the child flexible items using the order property. NOTE − Please make a note that the order ... Read More

How to set the maximum value of progress bar using HTML?

Abhishek
Updated on 20-Nov-2023 15:25:57

69 Views

The progress bar on any website is used to represent the percentage of any work that is completed like the download progress of any song or movie from any website. You can use the progress bar to show the amount of song or movie that is downloaded and remaining. In HTML, we can use the element to show a progress bar on the website to represent the amount of completed and the remaining work. You can handle the value of the progress bar on your own by defining the attributes with the element itself. Let us now understand ... Read More

How to set the inset shadow using CSS?

Abhishek
Updated on 20-Nov-2023 15:14:31

59 Views

Generally, we use the box-shadow property to apply shadow around any box or container. The box shadow property in CSS by default applies the shadow outside around the boundaries of the container. But we can also use the box shadow property to set the shadow inside the container as well. Let us see how we can use the box shadow property to set the inner shadow to a container and make it look attractive. Syntax We can use the box shadow property with different number of values for different purposes as shown in the below syntax − box-shadow: x-offset ... Read More

How to set the cursor style on browser using CSS?

Abhishek
Updated on 20-Nov-2023 15:10:18

31 Views

Generally, the cursor on any browser window is of arrow type by default. But you can change the cursor style or type to any style of your choice for any kind of text. There are many cursor style options that are available in CSS that you can choose to style your cursor like pointer, zoom-in, zoom-out etc. You can also use any image or icon as a cursor style value to change the cursor style to an image. There is a cursor property provided by the CSS that we can use to style our cursor on browser using CSS. Let ... Read More

How to set the content as a counter?

Abhishek
Updated on 20-Nov-2023 15:06:46

49 Views

In general, we use JavaScript to set the dynamic content as counter for the content on the web page. But in this article, we are going to learn how we can set the content as counter using the CSS counter properties. It is possible to set content as counter by using the counter properties inside the before or after pseudo selectors. Let us now see the counter properties we can use to set the content as counter using CSS. The CSS counters are just like the variables in other languages. We can increment their values using CSS rules or properties. ... Read More

Previous 1 ... 5 6 7 8 9 ... 906 Next
Advertisements