Imran Alam has Published 54 Articles

How to render a list without rendering an engine in JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 11:35:19

1K+ Views

In this tutorial, we'll be discussing how to render a list without rendering an engine in JavaScript. We'll go over the different methods and techniques that can be used to achieve this. Method 1: Using the Array.forEach() Method One way to render a list without rendering an engine in JavaScript ... Read More

How to get index in a sorted array based on iterator function in JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 11:30:45

2K+ Views

Iterator functions are used to iterate through arrays, lists, and other data structures. In JavaScript, there are several ways to get the index at which a value should be inserted into a sorted array. Using the Array sort() and indexOf() Methods The sort() method can be used to sort an ... Read More

How to filter values from an array using the comparator function in JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 11:28:02

568 Views

In JavaScript, filtering an array can be done by using the filter() method. This method is used to create a new array with all the elements that pass the condition provided in the callback function. However, what if we want to filter out the values for which the comparator function ... Read More

How to negate a predicate function in JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 08:13:29

1K+ Views

In JavaScript, a predicate function is a function that returns a Boolean value. In other words, it is a function that tests whether a certain condition is true or false.There are times when we need to negate a predicate function. That is, we need to return the opposite Boolean value.There ... Read More

How to make active tab in navigation menu using HTML CSS & JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 08:04:55

12K+ Views

With the help of HTML, CSS, and JavaScript, it is possible to create a navigation menu with a curved active tab. This can be done by using the ::before and ::after pseudo-elements to create the desired shape, and then using JavaScript to add the active class to the element. HTML ... Read More

How to Create Fullscreen API using JavaScript?

Imran Alam

Imran Alam

Updated on 04-Aug-2022 07:58:29

649 Views

The Fullscreen API is a browser API that allows developers to request fullscreen display from the user, and to exit fullscreen when desired. Using the Fullscreen API is relatively simple. First, you must check if the browser you are using supports the Fullscreen API. You can do this by checking ... Read More

How to return an object by parsing http cookie header in JavaScript?

Imran Alam

Imran Alam

Updated on 03-Aug-2022 14:07:42

3K+ Views

Cookies are small pieces of data that are sent from a website to a user's web browser. They are used to store information about the user, such as their preferences or login status. When a user visits a website, their web browser will send a request to the server. The ... Read More

How to Generate Random Birthday Wishes using JavaScript?

Imran Alam

Imran Alam

Updated on 03-Aug-2022 13:59:57

1K+ Views

In this tutorial, we will learn how to generate a random birthday wish using JavaScript. We will use the Math.random() method to generate a random number between 1 and 10. This number will be used to select a birthday wish from an array of wishes. The Math.random() Method The Math.random() ... Read More

What is Variable Shadowing in JavaScript?

Imran Alam

Imran Alam

Updated on 03-Aug-2022 13:54:55

4K+ Views

In programming, shadowing occurs when a variable declared in a certain scope (e.g. a local variable) has the same name as a variable in an outer scope (e.g. a global variable). When this happens, the outer variable is said to be shadowed by the inner variable. In JavaScript, variables can ... Read More

How to create infix to postfix converter in JavaScript?

Imran Alam

Imran Alam

Updated on 03-Aug-2022 13:43:50

890 Views

An infix to Postfix converter is a tool that converts an infix expression to a postfix expression. In this tutorial, we will build the infix to postfix converter using JavaScript. What is an infix expression? Infix expression is an expression in which the operators are between the operands. For example, ... Read More

Advertisements