AmitDiwan has Published 10740 Articles

The yield* expression/keyword in JavaScript.

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:39:33

160 Views

The yield* expression is used to refer to another generator or iterable object.Following is the code to implement yield* expression/keyword in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {     ... Read More

The new.target in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:36:54

198 Views

The new.target is a metaproperty that allows us to determine at runtime whether a function or constructor was called using the new keyword or not.Following is the code for new.target in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, ... Read More

Object initializer in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:29:04

338 Views

An object initializer is an expression that allow us to initialize a newly created object. It is a comma-separated list of zero or more pairs of property names and associated values of an object enclosed in a pair of curly braces {}.Following is the code for object initializer in JavaScript.Example Live ... Read More

Accessing an array returned by a function in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:23:22

843 Views

Following is the code for accessing an array returned by a function 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

Strict equality vs Loose equality in JavaScript.

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:21:21

1K+ Views

The loose equality operator ‘==’ allows us to compare two or more operands by converting their value to a common type first and then checking for the equality between them.strict equality operator ‘===’ allows us to compare two or more operands by checking the equality between the values as well ... Read More

loose equality in JavaScript

AmitDiwan

AmitDiwan

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

276 Views

The loose equality operator ‘==’ allows us to compare two or more operands by converting their value to a common type first and then checking for the equality between them.Following is the code to implement loose equality in JavaScript −Example Live Demo Document    body { ... Read More

Accessor property and its attributes in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:16:40

237 Views

The accessor property helps us in implementing getter and setter functions in JavaScript.They execute a function on getting or setting a value.There are four attributes of an accessor property −get − It gets called when a property is read. It doesn’t’ take any arguments/set − It gets called when a ... Read More

Renaming imports and exports in JavaScript

AmitDiwan

AmitDiwan

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

222 Views

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

Loading JavaScript modules dynamically

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:12:34

223 Views

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

Keyed collections in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:10:32

675 Views

Keyed collections are data collections that are ordered by key not index. They are associative in nature. Map and set objects are keyed collections and are iterable in the order of insertion.Following is the code for keyed collections in JavaScript −Example Live Demo Document    body ... Read More

Advertisements