Shubham Vora

Shubham Vora

793 Articles Published

Articles by Shubham Vora

Page 44 of 80

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

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 1K+ 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 the array and add numbers to that. After that, we will sum up all numbers. This tutorial will teach us to create a dynamic length array with numbers and sum the numbers using JavaScript. Use the for loop to sum all elements of the dynamic array We can iterate over ...

Read More

How to create a dropdown list using JavaScript?

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 13K+ 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 can do the same thing using multiple radio buttons, but what if we have hundreds of choices? Then we can use the dropdown menu. When users click the dropdown button, it opens all the choices, and users can select anyone. Also, the dropdown provides a better user experience than the ...

Read More

How to create Dialog Box in ReactJS?

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 13K+ Views

The dialog box is a popup box like a modal in ReactJS. In vanilla JavaScript, maybe you have used the alert() method, which allows us to show an alert message in the alert box. Also, vanilla JavaScript provides the confirm box and prompt box to take user input. The dialog box also allows us to perform all operations. We can add the normal HTML to the dialog box according to our requirements, and it works as a popup box. In this tutorial, we will use the various libraries to create a dialog box. Use the Material-Ui library The Material-Ui library ...

Read More

How to Create Dark/Light Mode for a Website using JavaScript/jQuery?

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 8K+ Views

Dark mode is very important for any website. Users with different interests visit the websites. Some of them like dark mode, and some like light mode. According to one survey, around 70 to 80% of people like dark mode, and only 20 to 30% like light mode. So, it is necessary to create a dark mode for any website, allowing users to toggle between the dark and light modes. Below, we will create a simple webpage using HTML, CSS, and JavaScript. Also, we will learn to implement the light and dark modes using JavaScript and CSS. Syntax Users can follow ...

Read More

How to create Dark Mode in ReactJS using Material UI?

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 2K+ Views

Using the Material UI library, we will learn to create a Dark Mode in ReactJS. The Material UI is the external react library that provides the designed react components that we can directly use in our react project by importing from the library. In the world, most users like dark mode, and only some love light mode. The dark mode helps us decrease visitors' eye strain and look more luxurious. So, we should allow users to choose the either dark or light mode according to their preference. In vanilla JavaScript or JQuery, we can create dark and light modes by ...

Read More

How to create a chart using bootstrap?

Shubham Vora
Shubham Vora
Updated on 16-Feb-2023 3K+ Views

The chart is very important to visualize the data, and we can show the data in various formats and analyze the pattern in the data. Also, the chart is more important for data scientists as they need to analyze the various data. Bootstrap is a library that allows us to draw various charts using JavaScript or JQuery. It contains the functions that we need to import and pass chart type and chart data as an argument of the function, and it will prepare a chart for us. This tutorial will teach us to draw various chart patterns using Bootstrap. Syntax ...

Read More

Computer Network - Definition, Components, Objectives

Shubham Vora
Shubham Vora
Updated on 23-Jan-2023 2K+ Views

PCs are incredible things; however, they genuinely sparkle when they are important for an organization. When a gadget is associated with an organization, it can achieve a lot more, including web surfing, conveying and working with partners, looking into data, putting away information, and managing a monetary exchange, in addition to other things. A PC network is a ton of gadgets related through joins. A middle point can be a PC, printer, or other gadget arranged to send or get the information. The affiliations imparting the middle focuses are known as correspondence channels. PC Affiliation incorporates conveyed managing in ...

Read More

How does tuple destructuring work in TypeScript?

Shubham Vora
Shubham Vora
Updated on 20-Jan-2023 2K+ Views

In TypeScript, a tuple is an object which contains the values of different data types. The length of a tuple is always pre-defined. It is similar to an array, but the array contains the values of only one data type, and the tuple contains values of multiple data types. Destructuring the tuple means getting the values from the tuple in separate variables. For example, we need to use tuple values multiple times in the code block. We can get all values in separate variables and use variables whenever we require tuple values, rather than every time accessing values from tuple ...

Read More

How to make object properties immutable in TypeScript?

Shubham Vora
Shubham Vora
Updated on 20-Jan-2023 3K+ Views

The simple definition of the immutable object property is the properties we can’t modify once we define and initialize the object property. We can use the const keyword, but we have to initialize the property while creating the property. So, we have to use the readonly keyword to make the property immutable, allowing it to be read-only. So, once we initialize the property, we can’t modify the value of the property. Syntax Users can follow the syntax below to use the readonly keyword to make object properties immutable. interface test { readonly property1: boolean; } var object: ...

Read More

How to create a stack in TypeScript using an array?

Shubham Vora
Shubham Vora
Updated on 20-Jan-2023 3K+ Views

The stack is a data structure based on the LIFO, which means last in, first out. In brief, it says that whatever element you add at last in the stack comes out first from the stack. There are some basic operations that users can perform on the stack. For example, we can push an element to the stack, pop an element from the stack, or peek an element from the stack. Here, users can see the basic methods of the stack, which we will also implement while creating the stack in this tutorial. Stack Methods Push() − It allows ...

Read More
Showing 431–440 of 793 articles
« Prev 1 42 43 44 45 46 80 Next »
Advertisements