Found 8895 Articles for Front End Technology

How to use Selenium Web Driver and JavaScript to Login any website?

Shubham Vora
Updated on 07-Mar-2023 14:08:52

2K+ Views

Nowadays, automation is very useful for testing the application. Many automation tools are available, and Selenium is one of them, developed in 2004. Also, it is a crossplatform tool, so we can use Selenium with most programming languages, and here we will use it with JavaScript. Users need to create the NodeJS application to use the Selenium web driver with JavaScript. Create a NodeJS Application Users can follow the steps below to create a NodeJS application. Step 1 – Open the project directory in the terminal and enter the below command. npm init -y Step 2 – ... Read More

How to use Regex to get the string between curly braces using JavaScript?

Shubham Vora
Updated on 06-Mar-2023 14:52:37

5K+ Views

We can create a regular expression so it can find all the substrings between the curly braces. After that, we can use the exec() or match() method to extract the matching substring. In this tutorial, we will learn to use a regular expression to get the string between curly braces using JavaScript. For example, if we have given a string like ‘This is a {string} with {curly} braces, we need to extract all substrings that reside between the curly braces. Using the exec() method with a regular expression to get the string between curly braces The exec() ... Read More

How to use Radio Component in Material UI?

Shubham Vora
Updated on 06-Mar-2023 14:22:09

2K+ Views

The radio button is used to allow users to choose any one value among a group of values. For example, the best use case of the radio button is allowing users to choose a gender in the form. The material UI provides the pre-designed Radio component, which we can use to create a group of radio buttons. Users can use the below command in the terminal to install the Material UI library in the React project. npm install @mui/material @emotion/react @emotion/styled Syntax Users can follow the syntax below to use the Radio component of the ... Read More

How to use Particle.js in JavaScript project?

Shubham Vora
Updated on 06-Mar-2023 12:43:35

2K+ Views

As the name suggests, the Particle.js library allows us to add particles to a particular HTML element. Also, we can change the shape of the particles number of particles in the div. We can add animation or motion to particles using the Particle.js library. Here, we will learn to change the shape, colour, and motion of particles via different examples. Syntax Users can follow the syntax below to use the Particle.js library in a JavaScript project. tsParticles.load("id", { particles: { // properties for the ... Read More

How to sorting an array without using loops in Node.js?

Shubham Vora
Updated on 06-Mar-2023 12:38:44

905 Views

In Node.js, a built-in sort() method is available to sort an array without a headache. However, as a beginner to learn how the sort() method works internally, users should learn various sorting algorithms. In this tutorial, we will learn a different algorithm to sort an array without using loops in NodeJS. Use the setInterval() method The setInterval() method allows us to invoke any particular function after each interval. Also, we can store the id of the setInterval() method in any variable and use it later to clear the interval. So, we can call a callback function in the ... Read More

How to create a dynamic search box in ReactJS?

Shubham Vora
Updated on 06-Mar-2023 12:02:41

3K+ Views

Search is one of the most important functionalities of the website. It allows users to filter products and search for specific things on the website, reducing the time users find particular things on the website. For example, you can see a search bar at the top of this page. Whenever we enter any search input, it shows us a search result by filtering the courses and tutorials based on the search result. This tutorial will teach us to implement dynamic search from scratch in ReactJS. Use the AutoComplete Component of Material UI The Material UI library contains various ... Read More

Javascript Program to Count pairs with given sum

Prerna Tiwari
Updated on 06-Mar-2023 11:58:52

736 Views

Counting pairs with a given sum is a common problem in computer science and is often used in many real-world applications such as cryptography and data compression. The problem is to find the number of pairs in an array that have a sum equal to a given value. In this blog post, we will explore different solutions to this problem and their time and space complexities. Given an array of n integers and a given sum S, find the total number of pairs of elements in the given array with sum is equal to S. Input array[]=[2, 4, ... Read More

Javascript Program to Count 1’s in a sorted binary array

Prerna Tiwari
Updated on 06-Mar-2023 11:56:21

286 Views

We have two approaches to count 1’s in a sorted binary array. The first one is to iterate through the array and count the 1's. The second approach is to use a binary search algorithm to find the first occurrence of 1 in the array. It is important to note that in order to use these approaches, the array must be sorted. In this blog post, we will discuss a JavaScript program to count the number of 1's in a sorted binary array. We will also look at some edge cases and optimization techniques to make the program ... Read More

How to create Accordion in ReactJS?

Prerna Tiwari
Updated on 06-Mar-2023 11:52:03

8K+ Views

A UI element called an accordion enables user to expand and compress content portions. A great method to add interactivity to your online application and make it simpler for visitors to explore and find the information they need is to create an accordion in ReactJS. This article will walk you through the steps required to create an accordion in ReactJS and provide sample code to get you started. Step 1: Setting up the React Project To get started, you must have a React project set up. The create-react-app command can create a new project if you don't currently ... Read More

How to create a simple counter Using ReactJS?

Prerna Tiwari
Updated on 06-Mar-2023 11:50:03

9K+ Views

Your online application can benefit greatly from adding interactivity by utilizing ReactJS to create a straightforward counter. In this tutorial, we will outline the procedures needed to build a straightforward counter using ReactJS and offer some sample code to get you started. Step 1: Setting up the React Project To get started, you will need to have a React project set up. If you don't already have one, you can use the create-react-app command to set up a new react project. npx create-react-app counter-app cd counter-app npm start This will set up a new project in a ... Read More

Advertisements