AmitDiwan has Published 10740 Articles

Creating ‘Copy to Clipboard’ feature on a web page with JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:42:09

220 Views

Following is the code for creating ‘copy to clipboard’ feature on a web page with JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       ... Read More

How to disable mouse event on certain elements using JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:38:57

4K+ Views

Following is the code for disabling mouse event on certain elements using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;   ... Read More

Explain Enumerated Types in JavaScript.

AmitDiwan

AmitDiwan

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

180 Views

JavaScript doesn’t support Enums out of the box. The only way to have enums in javaScript is to implement them using objects.Following is the code showing enumerated types in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, ... Read More

How to embed JavaScript in HTML file?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:20:18

558 Views

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

Explain shorthand functions in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:16:46

1K+ Views

The arrow functions also known as shorthand functions were introduced in ES2015 and allows us to write function in a shorter way. They don’t have their own binding to this and get the this from the surrounding context.Following is the code showing shorthand functions in JavaScript −Example Live Demo ... Read More

Flattening multi-dimensional arrays in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:15:57

413 Views

Following is the code for flattening multi-dimensional arrays 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

Flattening arrays in JavaScript

AmitDiwan

AmitDiwan

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

367 Views

Following is the code for flattening arrays 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 create a URL object using JavaScript?

AmitDiwan

AmitDiwan

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

535 Views

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

File and FileReader in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 08:05:46

390 Views

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

How to convert an Image to blob using JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 07:57:11

15K+ Views

Following is the code to convert an image to blob using 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