Prerna Tiwari has Published 25 Articles

How to Create a Tab Image Gallery?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:42:02

Creating a tab image gallery is a great way to showcase a collection of images on a website. By following the steps outlined in this tutorial, you can easily create a tab image gallery using HTML, CSS, and JavaScript. This gallery can be used to display various images, such as ... Read More

How to create a style tag using JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:37:51

JavaScript allows developers to create and manipulate style tags in order to change the appearance of a webpage. By using the document.createElement() method, the .sheet property, and the .insertRule() and .deleteRule() methods, we can add, modify, and remove CSS rules from a stylesheet. By combining these techniques with event listeners, ... Read More

How to create a private variable in JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:11:44

Closures, Symbols, WeakMaps, class private fields, and Proxies are a few techniques that can be used to create a private variable in JavaScript. Every technique has benefits and drawbacks, so it's crucial to pick the one that best suits your requirements. Like many other programming languages, JavaScript has the ... Read More

How to create a global Promise Rejection Handler in JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:09:27

Promise rejection handlers are a powerful tool in JavaScript for handling errors that occur in asynchronous code. In this article, we will learn how to build a global promise rejection handler in JavaScript and how it might assist your application manage errors. You can detect unhandled promise rejections using the ... Read More

How to create a function from a string in JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:06:43

Creating a function from a string in JavaScript can be helpful in situations when you need to generate a function dynamically at runtime or when you have a string that contains the code for a function you wish to execute. The ability to construct a function from a string ... Read More

How to convert a plain object into ES6 Map using JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 16:03:11

There are many ways to convert a plain object into an ES6 Map in JavaScript. The simplest and most effective way is using the Object.entries() function and the Map() constructor. In contrast, the more flexible alternatives include Object.keys() and Array.prototype.forEach() and the for...in loop and Map() function method. A ... Read More

How to convert a pixel value to a number value using JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 15:57:49

Converting pixel values to number values in JavaScript is a simple task that can be accomplished using built-in functions such as parseInt(), parseFloat(), Number() and also string method replace(). Each method has its own advantages and disadvantages and the best method to use will depend on the specific requirements of ... Read More

How to convert a number into an array in JavaScript?

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 15:43:42

In JavaScript, there are many built-in methods that can convert a number into an array. The simplest one is to the split() method. We can also use the map(), reduce(), or form() methods to perform the task. Some of the most popular methods for converting a number into an array ... Read More

Form required attribute with a custom validation message in HTML5

Prerna Tiwari

Prerna Tiwari

Updated on 02-Mar-2023 15:37:53

HTML5 includes a number of built-in form validation features that allow developers to easily add validation to their forms. One of these features is the "required" attribute, which specifies that an input field is required and must be filled out before the form can be submitted. The “required” attribute ... Read More

Writing Functions and Stored Procedures in SQL Server

Prerna Tiwari

Prerna Tiwari

Updated on 09-Jan-2023 16:44:40

A collection of SQL statements is contained in stored procedures and functions, database objects used to carry out certain tasks (or may also be used in data science). Both are distinct from one another in a variety of ways. In this article, we will be discussing functions and procedures in ... Read More

Advertisements