AmitDiwan has Published 10740 Articles

How to implement asynchronous loop in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:31:59

215 Views

Following is the code to implement asynchronous loop in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;       color: ... Read More

What is the best way to add an event in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 09:12:58

161 Views

The best way to add an event to any element is to use the addEventListener() method.Following is the code to add an event in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result{ ... Read More

JavaScript program to decrement a date by 1 day

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 09:11:04

287 Views

Following is the code to decrement a date by 1 day in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result, .sample {       font-size: 20px;       font-weight: 500; ... Read More

How to find keys of a hash in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 09:09:10

450 Views

Following is the code for finding keys of a hash in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;    } ... Read More

How can we validate decimal numbers in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 09:02:49

557 Views

Following is the code to validate decimal numbers in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;    } ... Read More

How can I remove a child node in HTML using JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:58:54

221 Views

Following is the code to remove a child node in HTML using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;   ... Read More

How to load a JavaScript file Dynamically?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:56:27

670 Views

Following is the code to load a JavaScript file dynamically −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;    } ... Read More

Named arguments in JavaScript.

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:53:14

251 Views

Following is the code for using named arguments in JavaScript functions −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample, .result {       font-size: 18px;       font-weight: 500;     ... Read More

Can we have a return statement in a JavaScript switch statement?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:47:22

21K+ Views

The JavaScript switch statement can contain return statements if it is present inside a function. The function will return the value in the switch statement and the code after the switch statement will not be executed.Following is the code to have return statements in JavaScript switch statement −Example Live Demo ... Read More

How to group array of objects by Id in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:43:33

2K+ Views

Following is the code to group array of objects by id in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;   ... Read More

Advertisements