Found 10710 Articles for Web Development

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 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

How to Create a Responsive Like Button in ReactJS?

Prerna Tiwari
Updated on 06-Mar-2023 11:47:16

5K+ Views

Creating a responsive like button in ReactJS is a fantastic method to increase the interactivity of your web application. The steps required to create a responsive like button in ReactJS will be discussed in this blog post, along with some sample code, to get you started. Let's first examine a React component's basic structure. A React component is a JavaScript function that generates a React element. A React element is a straightforward JavaScript object that describes a DOM node. A button element that a user can click to express their approval of a piece of material would be a ... Read More

How to create a new object from the specified object, where all the keys are in lowercase in JavaScript?

Prerna Tiwari
Updated on 06-Mar-2023 11:41:42

2K+ Views

There are many methods for creating new objects from older ones in JavaScript. Creating a new object with the same keys as an existing object but with all the keys in lowercase is a common use case. When working with data from many sources that have irregular key casing, this can be helpful. We'll look at various JavaScript ways to create new objects with lowercase keys in this blog post. However, before doing so, it's important to remember that while creating a new object with lowercase keys might be helpful when working with data from various sources, it's also ... Read More

How to Create a Model in Backbone.js?

Prerna Tiwari
Updated on 06-Mar-2023 11:37:41

208 Views

Backbone.js is a popular JavaScript framework that allows developers to create dynamic and interactive web applications Backbone.js's ability to build models that can be used to store and modify data is one of its primary strengths. In this article, we'll look at how to build a model in Backbone.js and how to apply it to a web application. Creating a Model Using the Backbone.Model class, you must first specify a new model before you can build one in Backbone.js. Here is an example of how to make a straightforward model called "Person" − var Student = Backbone.Model.extend({ ... Read More

How to create a JavaScript callback for knowing if an image is loaded?

Prerna Tiwari
Updated on 06-Mar-2023 11:34:54

2K+ Views

Strong programming languages like JavaScript are frequently used to build interactive, dynamic web pages. The loading of images on a website is one of JavaScript's most popular uses. However, loading images might be challenging, particularly when determining whether a load is complete. In this article, we'll go through how to make a JavaScript callback that detects if an image has loaded or not. What is a callback function? A callback function is a function that is invoked after the initial function has finished running and is supplied as an argument to another function. To put it another way, a ... Read More

Advertisements