AmitDiwan has Published 10744 Articles

Currying VS Partial Application in JavaScript.

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 08:02:59

270 Views

Currying − In currying a function takes another function and some arguments. The function then returns one function with one parameter only. It returns the function with one argument which can be chained together.Partial application − In partial application some of the arguments can be bind to some values to ... Read More

Drawing an image in canvas using in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:58:39

463 Views

Following is the code for drawing an image in canvas using JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } Drawing an image in canvas CLICK HERE Click on ... Read More

First class function in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:53:06

667 Views

JavaScript treats functions as objects and allow us to pass functions as parameter to another function and even return functions from other functions. In JavaScript the functions are first class functions meaning we can store them in variable, objects and array. The higher order functions can take function, return them ... Read More

Identifying False values in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:51:36

526 Views

JavaScript has the following values evaluate to false when evaluated as Boolean type − false0empty string: "" , '' , or ``nullundefinedNaN — not a number valueFollowing is the code for identifying falsy values in JavaScript −Example Live Demo Document    body {       ... Read More

Implementing Linear Search in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:48:36

436 Views

Following is the code for implementing linear search 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

ES6 Property Shorthands in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:47:39

183 Views

In ES6, if the object key name and variables passed as properties value have same name then we can simply omit the value name and only specify the key name.Following is the code for property shorthands in JavaScript −Example Live Demo Document body ... Read More

Awaiting on dynamic imports in JavaScript.

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:42:30

173 Views

Note − You will need a localhost server to run this example −Following is the code for dynamic imports in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       ... Read More

Nesting template strings in JavaScript

AmitDiwan

AmitDiwan

Updated on 22-Jul-2020 07:40:39

586 Views

Following is the code for nesting template strings 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

Function borrowing in JavaScript.

AmitDiwan

AmitDiwan

Updated on 21-Jul-2020 07:45:55

375 Views

The call(), apply() and bind() are used to borrow methods in JavaScript.Following is the code for borrowing methods in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result, .sample {       ... Read More

How to transform JavaScript arrays using maps?

AmitDiwan

AmitDiwan

Updated on 21-Jul-2020 07:43:53

110 Views

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

Advertisements