Prerna Tiwari has Published 24 Articles

How to Create a Tab Image Gallery?

Prerna Tiwari

Prerna Tiwari

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

2K+ Views

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

6K+ Views

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

4K+ Views

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

600 Views

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

1K+ Views

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

264 Views

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

3K+ Views

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

5K+ Views

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

15K+ Views

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

Software Engineering for Data Scientists in Python

Prerna Tiwari

Prerna Tiwari

Updated on 09-Jan-2023 16:41:06

198 Views

Data science integrates math and statistics, specialized programming, advanced analytics, machine learning, and artificial intelligence (AI) with specific subject matter expertise to reveal actionable insights hidden in an organization’s data. Data science is one of the fields which has shown the quickest growth rates across all industries. This is ... Read More

Advertisements