AmitDiwan has Published 10740 Articles

Share methods in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:45:25

669 Views

Methods can be shared by attaching them to the prototype property of the object. These methods will be shared among all the instances of the object.Following is the code for sharing methods in JavaScript −Example Live Demo Document    body {       font-family: "Segoe ... Read More

Shared properties in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:41:09

422 Views

Properties can be shared by attaching them to the prototype property of the object. These properties will be shared among all the instances of the object.Following is the code for sharing properties in JavaScript −Example Live Demo Document    body {       font-family: "Segoe ... Read More

Passing a function as a callback in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:38:02

273 Views

Following is the code for passing a function as a callback 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

Invoking functions with call() and apply() in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:36:10

205 Views

Following is the code for invoking functions with call() and apply() 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

Implementation of Queue in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:33:10

359 Views

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

Implementation of Stack in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:29:41

480 Views

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

How do we loop through array of arrays containing objects in JavaScript?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 09:16:06

566 Views

Following is the code to loop through array of arrays containing objects 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

How to pass event objects from one function to another in JavaScript?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 09:12:43

3K+ Views

Following is the code to pass event objects from one function to another in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } Pass event objects from one function to another in ... Read More

How to change an object Key without changing the original array in JavaScript?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 09:09:12

491 Views

Following is the code to change an object key without changing the original array in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } Change an object Key without changing the original ... Read More

Joining a JavaScript array with a condition?

AmitDiwan

AmitDiwan

Updated on 18-Jul-2020 09:06:07

638 Views

Following is the code to a JavaScript array with a condition 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

Advertisements