Saurabh Anand

Saurabh Anand

17 Articles Published

Articles by Saurabh Anand

Page 2 of 2

How to create 3D Geometries in webGL and p5.js?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 923 Views

Creating 3D geometries in WebGL and p5.js enables developers to build interactive and visually compelling web applications. With built-in functions for basic shapes, texture mapping, and transformations, both libraries provide powerful tools for 3D graphics development. Understanding WebGL vs p5.js for 3D Graphics WebGL is a low-level graphics API that provides direct access to the GPU, while p5.js offers a higher-level, artist-friendly interface. For complex 3D applications, Three.js (built on WebGL) is often preferred, whereas p5.js excels in creative coding and educational contexts. Creating Basic 3D Shapes Using Three.js (WebGL-based) Three.js simplifies WebGL by providing ...

Read More

How to Create a Binary Calculator using HTML, CSS and JavaScript?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 2K+ Views

A binary calculator is a program that performs mathematical calculations on binary numbers. Binary numbers consist of only two digits: 0 and 1. In this tutorial, we'll create a functional binary calculator that can perform addition, subtraction, multiplication, and division operations using HTML for structure, CSS for styling, and JavaScript for functionality. HTML Structure First, let's create the HTML structure with a form containing a display field and buttons for binary digits and operations: Binary Calculator ...

Read More

How to create a button that submits a form and downloads a pdf simultaneously?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 3K+ Views

By using HTML, JavaScript and jsPDF, we can create a button that can submit the form and download a PDF simultaneously. We will use HTML to create a form, JavaScript to handle the submission process and jsPDF to generate the PDF document. This is a common requirement in web applications where users need to submit data and receive a PDF receipt or confirmation document. Setting Up the Form First, let's create a basic HTML form with input fields to collect user information: Contact Form Enter your Name: ...

Read More

How to create a function `generateSelector` to generate CSS selector path of a DOM element ?

Saurabh Anand
Saurabh Anand
Updated on 15-Mar-2026 409 Views

The generateSelector function is a helpful tool for determining the CSS selector path of a specific DOM element. This is useful in scenarios like testing automation, debugging, or building tools that need to identify elements on a webpage. The function analyzes an element and its ancestors to create a unique CSS selector path. Understanding CSS Selectors CSS selectors are patterns used to select HTML elements for styling. They form the foundation of CSS by allowing you to target specific elements on a webpage. Example: Basic Element Selector The following example targets all elements and applies ...

Read More

How to Create a Bootstrap Spinner and Display on Screen till the data from the API loads ?

Saurabh Anand
Saurabh Anand
Updated on 21-Feb-2023 8K+ Views

Using Bootstrap, we will create a Bootstrap spinner and display it on the screen until data from an API is loaded. This will give customers visual indications that something is going on in the background and can be an excellent method to improve the user experience. In this blog, we will be utilizing Bootstrap, a famous front-end programming framework. Follow the below steps to create a Bootstrap spinner and display on screen till the data from the API loads - Step 1: Include the Bootstrap CSS and JavaScript Files We will begin with our first step by importing JavaScript ...

Read More

How to copy the content of a div into another div using jQuery?

Saurabh Anand
Saurabh Anand
Updated on 21-Feb-2023 8K+ Views

We can use jQuery html() method to copy the content of a div into another div. In jQuery, many other methods, such as clone(), append() & appendTo(), etc., can be used to copy the content. jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. In this tutorial, we will use different methods in jQuery to copy the content of one div into another div. Using the html() Method Using the jQuery html() function is the simplest approach to copy the content of a div into ...

Read More

ES6 Trampoline Function

Saurabh Anand
Saurabh Anand
Updated on 19-Jan-2023 477 Views

In this tutorial, we will mainly focus on the Trampoline function that appeared first in ES6(ECMAScript 6). We will start with the discussion of the Trampoline function. Need of using the Trampoline function. Advantages and disadvantages of using the Trampoline function. Now, let’s see the Trampoline function. What is a Trampoline Function? The trampoline is just a mechanism for optimizing recursion and preventing stack-overflow errors in languages that do not provide tail call optimization, such as JavaScript ES5. To overcome this problem of tail call optimization, trampoline was introduced in ES6 version. A trampoline function is essentially a loop that ...

Read More
Showing 11–17 of 17 articles
« Prev 1 2 Next »
Advertisements