AmitDiwan has Published 10744 Articles

JavaScript Promises

AmitDiwan

AmitDiwan

Updated on 11-May-2020 14:13:06

1K+ Views

Promises in JavaScript allow us to do asynchronous operations where the value is not known in advanced when the promise was being created. A promise can have three states pending, fulfilled and rejected.Following is the code for promises in JavaScript −Example Live Demo Document    body ... Read More

JavaScript Object Properties

AmitDiwan

AmitDiwan

Updated on 11-May-2020 14:07:18

203 Views

Properties in JavaScript are the values associated with an object. Following is the code implementing object properties in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample {       font-size: 18px; ... Read More

JavaScript Object Accessors

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:55:31

184 Views

The getter and setter keyword are used for accessing the objects. The getter return value is used when a property is being accessed and the setter takes an argument and sets the property value inside the object to that passed argument.Following is the code for accessing objects in JavaScript −Example Live ... Read More

JavaScript Numbers example

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:51:46

149 Views

Following is an example for numbers in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample{       font-size: 18px;       font-weight: 500;       color: red;    } ... Read More

JavaScript Number Function

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:48:26

216 Views

The JavaScript Number() Function converts an object value passed as an argument to its respective numeric value.Following is the code for the JavaScript Number() Function −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample{ ... Read More

JavaScript Number.MAX_VALUE & Number.MIN_VALUE with Examples

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:43:11

128 Views

The JavaScript Number.MAX_VALUE & Number.MIN_VALUE property represents the maximum and minimum numeric value representation possible in JavaScript respectively.Following is the code for the JavaScript Number.MAX_VALUE & Number.MIN_VALUE property −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;   ... Read More

JavaScript multiline Property

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:37:11

150 Views

The JavaScript multiline property returns true or false depending upon if the ‘m’ modifier has been set or not.Following is the code for the JavaScript multiline property −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } ... Read More

JavaScript match()

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:31:20

348 Views

The JavaScript match() returns the match as an array object if a match is found in a string against a regular expression.Following is the code for the JavaScript match() method −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, ... Read More

JavaScript Location protocol Property

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:29:26

200 Views

The JavaScript location protocol property returns the protocol used by the current URL.Following is the code for Location protocol Property in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample{       ... Read More

JavaScript Let

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:25:57

203 Views

The JavaScript Let keyword introduced in 2015 allows us to define block scoped variables.Following is the code for declaring variable using Let keyword in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample{ ... Read More

Advertisements