Shubham Vora has Published 962 Articles

Get requests using AJAX by making a Custom HTTP library

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:35:28

172 Views

We will learn to make a get request using the AJAX by making the custom HTTP library. Let’s learn about the Get request and AJAX before we start with the tutorial. The Get request is used to get or fetch data from the API (Application programming interface). The AJAX stands ... Read More

How to use Checkbox inside Select Option using JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:33:06

7K+ Views

Sometimes, we require to use the checkbox inside the select option. We can allow users to select multiple options by introducing the checkboxes with the select option. However, if we use the multiple attributes with the tag, it allows us to select them by pressing the ‘ctrl + left ... Read More

How to use await outside of an async function in JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:31:59

1K+ Views

In JavaScript, the async-await keyword is used to make the function asynchronous. If we make any function asynchronous, it works like multithreading and executes the code parallelly, which helps us to improve the application performance. Here, we will learn to use the await keyword outside the asynchronous function. Invoke the ... Read More

How to use array that include and check an object against a property of an object?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:27:55

4K+ Views

The task is to check whether the array contains a particular value. Also, we need to check if the array contains the particular object with the given property. This tutorial will use the array.includes(), and array.some() method to check whether the array contains the value or object with a particular ... Read More

How to swap two variables in JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:26:54

2K+ Views

We will learn to swap two variable values in JavaScript using various approaches. Let’s understand via example what swapping means. For example, we have two variables called variable1 and variable2. When we assign the values of variable2 to variable1 and the value of variable1 to variable2, we can say that ... Read More

How to sort option elements alphabetically using jQuery?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:24:17

6K+ Views

Sometimes, we require sorting the options of the dropdown menu in alphabetical order. For example, you are selling computers on your website, and you want to allow users to select a computer based on the model. If your website contains hundreds of models of different brands, it will be hard ... Read More

How to Create Query Parameters in JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:20:39

2K+ Views

Now, the question is why we need to create a query parameter using JavaScript. Let’s understand it via real-life examples. For example, if you go on amazon’s website and search for any product, you will see that it automatically appends your search query to the URL. It means we require ... Read More

How to create a hash from a string in JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:19:18

7K+ Views

Before we start, let’s understand the hash in JavaScript. The hash is also a string, but it's encrypted using a particular algorithm. Generally, we use the hash for security purposes. For example, Google stores users' emails and passwords in their database. Now, Google’s employees can access their database for development ... Read More

How to create a dynamic length array with numbers and sum the numbers using JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:18:02

855 Views

In JavaScript, arrays are always dynamic in length. Like other programming languages, we don’t need to define the array's length while creating the array. So, we can create an array and push whatever number of elements we want in the JavaScript array. Here, we will create the dynamic length of ... Read More

How to create a dropdown list using JavaScript?

Shubham Vora

Shubham Vora

Updated on 16-Feb-2023 15:16:43

12K+ Views

We will learn to create a dropdown list using HTML and JavaScript below. Before starting with the article, let’s understand the dropdown list and why we need to use it. The dropdown list gives multiple choices to users and allows them to select one value from all options. However, we ... Read More

Advertisements