Mayank Agarwal has Published 373 Articles

How to access HTML elements in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 14:15:34

19K+ Views

In HTML, sometimes the user needs to access the HTML elements to display the user different changes. We can support this by using modern-day JavaScript. To facilitate this, we can move ahead and change the HTML element by using the following techniques −Get HTML element by IdGet HTML element by ... Read More

Difference Between Static and Const in JavaScript

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 13:59:45

4K+ Views

Static variables can be defined as a class property that is used in a class and not on the class instance. This type of variable is stored in the data segment area of the memory. The value assigned to these types of variables is shared among every instance that is ... Read More

Difference between addEventListener and on-click in JavaScript

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 13:42:12

1K+ Views

The addEventListener and the on-click event both listen for an event. Both these event methods record an event and execute a function based on that event whenever a button is clicked. Though there is a difference between both these events work.In this article, we are going to explore the differences ... Read More

How to enable JavaScript in Chrome, Firefox, and Safari?

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 13:30:20

863 Views

JavaScript has become an inevitable part of modern-day websites. Each and every website requires the latest JavaScript support and works flawlessly once allowed. We have a toggle inside every browser to switch on and off the JavaScript on our websites. If JavaScript is not enabled in our browsers, they react abnormally ... Read More

How to Create an Area chart using Recharts in ReactJS?

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 13:26:19

2K+ Views

In this article, are going to explore the Rechart JS Library and implement it in a React application to watch how they are used. Rechart Libraries are specifically used for creating different types of charts over the React Application. Charts that can be built using this library are Line Charts, ... Read More

How to create a chart from JSON data using Fetch API in JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 13:04:04

5K+ Views

In this article, we are going to explore on how to create a chart after fetching the JSON data. To fetch JSON data we use fetch() method of Fetch API. We will first fetch the data and once the data is available we will feed it into the system to ... Read More

Create a Scatter Chart using Recharts in ReactJS

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 12:26:35

2K+ Views

In this article, are going to explore the Rechart JS Library and implement it in a React application to watch how they are used. Rechart Libraries are specifically used for creating different types of charts over the React Application. Charts that can be built using this library are Line Charts, ... Read More

How to Create a Profit and Loss Calculator using HTML, CSS, and JavaScript?

Mayank Agarwal

Mayank Agarwal

Updated on 21-Apr-2022 12:16:56

2K+ Views

In this article, we are going to create a calculator using JavaScript We will be using the basic math formulas to calculate the profit and loss. We will be returning the result in percentage along with the actual values.To calculate the Profit and Loss we need two things that are: ... Read More

Getting the Domain Info for Request in Express.js

Mayank Agarwal

Mayank Agarwal

Updated on 06-Apr-2022 12:47:07

3K+ Views

We need to get the DNS information to track the address from where we receive the requests. This feature also provides an added layer of security, protecting the application from different type of DOS and DDOS attacks.We can use the following functions to get the domain and host information.SyntaxGetting the ... Read More

Express.js – req.subdomains Property

Mayank Agarwal

Mayank Agarwal

Updated on 06-Apr-2022 08:27:37

532 Views

req.subdomains returns an array of all the subdomains in the domain name of the request. The application property subdomain offset is used for determining the beginning of the subdomain segments. The default value of the subdomain offset property is 2.Syntaxreq.subdomainsExampleCreate a file with the name "reqSubdomains.js" and copy the following ... Read More

Previous 1 ... 6 7 8 9 10 ... 38 Next
Advertisements