Found 8895 Articles for Front End Technology

JavaScript Program to Check if a string can be obtained by rotating another string d places

Prabhdeep Singh
Updated on 13-Apr-2023 15:18:37

96 Views

Rotating a string means moving the characters of the string to their left or right side by one index and one end may contain the value stored at the other end. We will be given two strings and we have to rotate the second string either in the left or the right direction by given number (d) times and check if both strings are equal or not. We will write proper code with comments, explanations, and detailed discussions on the time and space complexity of the program. Examples If we have the given string ‘abcdef’ and the other string is ... Read More

How to select all links inside the paragraph using jQuery?

Tarun Singh
Updated on 13-Apr-2023 14:26:17

857 Views

jQuery is a popular JavaScript library that simplifies HTML DOM traversal, event handling, and AJAX interactions for rapid web development. It offers a wide range of built-in functions and methods that help developers to manipulate HTML elements, styles, and behaviors dynamically. In this article, we will see how to select all links inside a paragraph using jQuery. Selecting links inside a paragraph is a common requirement when we want to modify the links in a particular section of our website, such as changing styles, finding links, etc. How to select all links inside the paragraph? Selecting links inside the ... Read More

How to select all even/odd rows in a table using jQuery?

Tarun Singh
Updated on 13-Apr-2023 14:22:11

537 Views

Working with tables is a very common task when it comes to developing web applications. And sometimes we may need to select a specific row from a table. Let’s say we want all the even or odd rows, but how to do that? In this article, we will see how to select all even/odd rows in a table with jQuery. Approaches to select all even/odd rows in the table To select all even rows in a table using jQuery, we have different approaches to achieve this task. Below we have discussed the three approaches that are commonly used in ... Read More

How to select all children of an element except the last child using CSS?

Tarun Singh
Updated on 13-Apr-2023 14:10:18

9K+ Views

CSS is a commonly used to style web pages. While developing a web app, we sometimes require to apply different styles to different elements. And this common requirement is to select all children of an element except for the last child! Applying CSS makes it possible to select all children of an element except the last child. In this article, we’ll see how to select all children of an element except the last child in CSS with different approaches. We will be discussing each approach in detail with its syntax, and examples that will help you understand how they ... Read More

How to create an Asynchronous function in JavaScript?

Tarun Singh
Updated on 13-Apr-2023 14:28:39

2K+ Views

A JavaScript asynchronous function is a function that runs independently of the main flow of the program. This allows the program continues executing other code while the async function is running. Async is used to declare an async function, which runs asynchronously, and await is used to pause the execution of the function until a specific asynchronous task is achieved. Method to create an Asynchronous function Using async keyword The simplest way to create an asynchronous function is to use the async keyword before the function declaration. See the below syntax − Syntax async function fetchData() { ... Read More

How Blazor Framework is Better Than JavaScript Frameworks?

Tarun Singh
Updated on 13-Apr-2023 14:06:19

2K+ Views

Web development is a rapidly evolving field, and Microsoft's Blazor framework is one of the latest entrants in the arena. Blazor is a client-side web framework that allows developers to build web applications using C# and .NET instead of JavaScript. While JavaScript frameworks like Angular, React, and Vue.js have been popular choices for web development for many years, Blazor offers some unique advantages that make it an attractive alternative. In this article, we will discuss how blazor framework may be considered better than JavaScript frameworks, including language familiarity, rendering, code sharing, tooling, security, etc. We’ll also know about the ... Read More

How to select all child elements recursively using CSS?

Tarun Singh
Updated on 13-Apr-2023 13:52:03

11K+ Views

CSS (or Cascading Style Sheets) is used in presenting and designing web pages. It is not used alone, rather it is used with HTML or XML for defining the appearance and layout of web pages. CSS helps developers in styling all the HTML elements including headings, paragraphs, text, images, tables, etc. And not only this, but it also specifies how they should be displayed on different screens, in printables, or on other media types. It can also be used for creating responsive web designs for different screen sizes and devices. CSS plays a significant role in web development because it ... Read More

How to create an array with multiple objects having multiple nested key-value pairs in JavaScript?

Tarun Singh
Updated on 13-Apr-2023 13:48:57

5K+ Views

JavaScript is a versatile language that is widely used for creating dynamic web applications. One of the most common data structures used in JavaScript is the array. An array is a collection of elements that can be of any type, including objects. In this article, we will discuss how to create an array with multiple objects having multiple nested key-value pairs in JavaScript. What are arrays? An array is a special type of object that stores a collection of values. These values can be of any data type, such as numbers, strings, booleans, and even other arrays. Arrays are a ... Read More

How to add multiple data types for props in Vue.js?

Mayank Agarwal
Updated on 12-Apr-2023 17:02:16

615 Views

The javascript attribute names are case insensitive, so browsers are made in a way to interpret any uppercase characters to lowercase. This means, while using the DOM elements, camel Cased props names need to use their kebab-based (hyphen-delimited) equivalents. So let’s say that you are not sure of the type of value you might receive from the props in Vue.js. Usually, you will want every prop to have a specific type of value. But in a case when you want a prop to have a list of value types, you can use the following syntax to apply the same. props: ... Read More

How to add elements to an Array using filters in Vue ?

Mayank Agarwal
Updated on 12-Apr-2023 17:00:22

383 Views

Vue can be defined as a progressive framework for building user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate with them. In the below article, we will see how to add elements to an array. An array is basically a collection of elements. This process of adding elements into an Array can be used in real life in different scenarios. For E.g.: It can be used for creating a shopping ... Read More

Advertisements