AmitDiwan has Published 10744 Articles

Keyed collections in JavaScript

AmitDiwan

AmitDiwan

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

638 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

Indexed collections in JavaScript

AmitDiwan

AmitDiwan

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

4K+ Views

Arrays are the indexed collection in JavaScript as they allow us to access an element using its index.Following is the code to implement indexed collections in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    } ... Read More

Conditional statements in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 08:06:19

2K+ Views

There are three types of conditional statements in JavaScript −If statement − The if statement is used to execute code inside the if block only if the specific condition is met.If else statement − The If….Else statement is used to check only two conditions and execute different codes for each ... Read More

Modifying prototypes in JavaScript

AmitDiwan

AmitDiwan

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

169 Views

Following is the code for modifying prototypes in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;       color: blueviolet; ... Read More

How to set JavaScript object values dynamically?

AmitDiwan

AmitDiwan

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

754 Views

Following is the code for setting JavaScript object values dynamically −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;       color: ... Read More

Setting object members in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:59:03

113 Views

Following is the code to set object members 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

Dot notation vs Bracket notation in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:57:11

2K+ Views

The dot notation and bracket notation both are used to access the object properties in JavaScript. The dot notation is used mostly as it is easier to read and comprehend and also less verbose. The main difference between dot notation and bracket notation is that the bracket notation allows us ... Read More

Dot notation in JavaScript

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:54:04

2K+ Views

The dot notation is used to access the object properties in JavaScript. Following is the code to implement dot notation −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: ... Read More

RegExp object in JavaScript.

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:51:54

152 Views

The RegExp object is used for pattern matching some text by searching and extracting the part of text. The RegExp object can be created either using the regexp constructor or the literal syntax.Following is the code for RegExp object in JavaScript −Example Live Demo Document   ... Read More

How to check if an object is an instance of a Class in JavaScript?

AmitDiwan

AmitDiwan

Updated on 20-Jul-2020 07:49:06

417 Views

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

Advertisements