Shubham Vora has Published 962 Articles

How to write a simple code of Memoization function in JavaScript?

Shubham Vora

Shubham Vora

Updated on 01-Mar-2023 10:46:23

270 Views

Memoization is the optimization technique to improve the performance of the function. Before we start with the memoization technique, let’s understand why we require it using the example below. Example (Naïve approach to finding Fibonacci number) In the example below, we have implemented the naïve approach to find the ... Read More

How to use polyfill in JavaScript?

Shubham Vora

Shubham Vora

Updated on 01-Mar-2023 10:38:38

2K+ Views

The developers of JavaScript always keep adding new features to the JavaScript language to improve performance and add better functionalities. Sometimes, it happens that new features don’t support by the old browser versions. For example, the exponential operator is introduced in ES7, and the trailing comma in the object is ... Read More

How to write and use for loop in Vue js?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:43:53

6K+ Views

Vue JS is an open-source JavaScript framework. It is used to create single-page apps and user interfaces. The component-based architecture of Vue Js uses separated, reusable elements called components to encapsulate HTML, JavaScript, and CSS. This enables the usage of a virtual DOM to boost performance while also helping efficient ... Read More

How to use routing in Vue.js?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:42:09

405 Views

The process of assigning URLs to components in the Vue.js app is known as routing. Installing the Vue-router library and importing it into the Vue instance are prerequisites for implementing routing. Then, the user must specify the components displayed for each route in a different router.js file after defining a ... Read More

Implement polyfill for String.prototype.trim() method in JavaScript

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:40:45

233 Views

Some old versions of the browsers or old browsers themselves don’t support the newly evolved features of JavaScript. For example, if you are using a very old browser version, it doesn’t support the features of the ES10 version of JavaScript. For example, some versions of the browser don’t support Array.falt() ... Read More

Implement polyfill for Array.prototype.reduce() method in JavaScript

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:35:08

1K+ Views

The polyfill is a concept to extend the browser's features using user-defined methods. If the user’s browser is not updated, it can happen that browser doesn’t support the newer features of any programming language, such as JavaScript. As a developer, we require to check whether the feature is supported ... Read More

Implement a JavaScript when an element loses focus

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:33:58

991 Views

When we click the input element in HTML, it sets the outline for the input element, focusing on it. Sometimes, we must execute some JavaScript code when the user loses focus from the input element. For example, We can autofocus the input element when the user refreshes the web ... Read More

Image Transition with Fading Effect using JavaScript

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:32:48

5K+ Views

Image transition means changing the image and replacing one image with another. Users can see the image transition in the image slider. While developing the image slider, we should focus on the animation for image transition to make an attractive UX of the application. In this tutorial, we will learn ... Read More

How to create Covid19 Country wise status project using REST API?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:28:35

245 Views

Before creating the project, we will first discuss REST API. REST is a software architecture style and a collection of standards that helps make online services. Representational State Transfer is the full name of REST. At the same time, Application programming interfaces (API) allow communication between two or more computer ... Read More

How to write shorthand for document.getElementById() method in JavaScript?

Shubham Vora

Shubham Vora

Updated on 28-Feb-2023 17:27:44

704 Views

The document.getElementById() method allows us to access any HTML element using its id in JavaScript. Every webpage can contain only a single HTML element with a single id. You can use the below example code to access any HTML element using its id. let element = document.getElementById('id'); In ... Read More

Advertisements