AmitDiwan has Published 10744 Articles

How to test and execute a regular expression in JavaScript?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 14:08:31

271 Views

Following is the code for testing and executing a regular expression 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

Explain JavaScript Regular Expression modifiers with examples

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 14:05:54

604 Views

The JavaScript regular expression modifiers are optional part of a regular expression and allow us to perform case insensitive and global searchers. The modifiers can also be combined together.Following are the modifiers −ModifierDescriptiongIt enables global matching and returns all the matched results instead of stopping at first matchiIt enables case ... Read More

Explain Strict Comparison in JavaScript switch statement?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 14:01:58

398 Views

The JavaScript switch statement only uses strict comparison (===) and doesn’t converts type if matches are not found using strict comparison and will immediately execute the default statement.Following is the code for strict comparison in JavaScript switch statement −Example Live Demo Document    body {   ... Read More

Explain common code blocks in JavaScript switch statement?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:56:19

254 Views

Following is the code to implement common code blocks in JavaScript switch statement −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;   ... Read More

How to verify if a JavaScript object is an array? Explain with examples.

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:53:49

138 Views

The JavaScript Array.isArray() method is used to verify if a JavaScript object is an array or not based on the Boolean value returned by it.Following is the code to verify if JavaScript object is an array −Example Live Demo Document    body {       ... Read More

How to set the day of a date in JavaScript?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:49:34

148 Views

Following is the code to set the day of a date 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

What are associative Arrays in JavaScript?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:45:07

4K+ Views

Associative arrays are basically objects in JavaScript where indexes are replaced by user defined keys. They do not have a length property like normal array and cannot be traversed using normal for loop.Following is the code for associative arrays in JavaScript −Example Live Demo Document   ... Read More

Creating a JavaScript array with new keyword.

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:43:05

196 Views

Following is the code for creating a JavaScript array with new keyword −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 20px;       font-weight: 500;    } ... Read More

What is meant by Splicing an array in JavaScript? Explain with an example

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:34:04

523 Views

Splicing an array means to use the Array.splice() method for adding or removing items from the array. The items removed are returned as an array.Following is the code for splicing an array in JavaScript −Example Live Demo Document    body {       font-family: "Segoe ... Read More

How to print positive and negative infinity values in JavaScript?

AmitDiwan

AmitDiwan

Updated on 15-Jul-2020 13:28:01

211 Views

Following is the code for printing positive and negative infinity values in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .num {       font-size: 18px;       font-weight: 500;   ... Read More

Advertisements