AmitDiwan has Published 10744 Articles

The debugger statement in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:41:24

827 Views

The debugger statement in JavaScript is used for setting a breakpoint in the code. The code stops execution as soon as it encounters the debugger statement and calls the debugger function (if available).Following is the code to implement debugger statement in JavaScript −Example Live Demo Document ... Read More

The yield* expression/keyword in JavaScript.

AmitDiwan

AmitDiwan

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

132 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

172 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

296 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

804 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

228 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

211 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

197 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

204 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

Advertisements