AmitDiwan has Published 10744 Articles

Combining multiple images into a single one using JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:55:27

7K+ Views

Following is the code for combining multiple images into a single one using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } Combining multiple images into a single one ... Read More

How to sort strings with accented characters using JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:52:50

412 Views

Following is the code to sort strings with accented characters 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

TypeError: ‘undefined’ is not an object in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:50:46

2K+ Views

The “TypeError: ‘undefined’ is not an object” error occurs when a property is accessed or a method is called on an undefined object. This error is shown only on safari browser.Following is the code for TypeError − ‘undefined’ is not an object error in JavaScript −Example Live Demo ... Read More

How to convert a node list to an array in JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:47:29

355 Views

Following is the code to convert a node list to an array in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample {       display: inline-block;       font-size: 20px; ... Read More

Can we check if a property is in an object with JavaScript?

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:46:18

116 Views

Following is the code to check if a property is in an object in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: ... Read More

Pseudo mandatory parameters in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:43:22

154 Views

Following is the code to implement pseudo mandatory parameters in functions 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

Fat vs concise arrow functions in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:41:22

237 Views

The consice arrow is more stream lined form of fat arrow functions for one-line functions. If the function body only has one line of code, then there isn’t any need of curly braces {} for function body as conscie arrow functions have implicit return. Also, if there is only one ... Read More

Concise arrow functions in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:39:29

442 Views

The conscise arrow function syntax is as follows −(param1, param2) =>param1+param2It doesn’t have the function keyword and the function body. There is only => between the parameters and function body and if there is single parameter than it can also be written like this −param1=>param1*2It has implicit return if there ... Read More

Fat arrow functions in JavaScript

AmitDiwan

AmitDiwan

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

329 Views

The fat arrow function syntax looks like the following −(param1, param2, ..)=>{ }It doesn’t have the function keyword and only have the => between the parameters and the function body.Following is the code implementing fat arrow functions in JavaScript −Example Live Demo Document    body { ... Read More

Passing parameters to callback functions JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 11:35:38

438 Views

Following is the code for passing parameters to callback functions 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

Advertisements