AmitDiwan has Published 10744 Articles

JavaScript - length of array objects

AmitDiwan

AmitDiwan

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

345 Views

The length property in JavaScript returns the size of the object. Following is the code for the length of string and array objects −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample,    .result ... Read More

JavaScript lastIndex Property

AmitDiwan

AmitDiwan

Updated on 11-May-2020 13:03:01

117 Views

The lastIndex property in JavaScript returns the index position when a match occurs and the next match then resumes from that position only. The lastIndex property works only if the ‘g’ modifier is set.Following is the code for the lastIndex property in JavaScript −Example Live Demo Document ... Read More

JavaScript - know the value of GET parameters from URL

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:57:08

227 Views

To know the value of GET parameters from URL in JavaScript, the code is as follows −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample {       font-size: 18px;       ... Read More

JavaScript JSON parse() Method

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:44:40

390 Views

The JSON parse() method is used for parsing a JSON string and then creating a JavaScript object from it.Following is the code for JSON parse() method −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }   ... Read More

JavaScript JSON HTML

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:42:33

259 Views

To generate HTML using JSON data, the code is as follows −Note − JSONPlaceholder is a fake Online REST API for Testing and PrototypingExample Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample {   ... Read More

JavaScript JSON Arrays

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:39:37

297 Views

Arrays in JSON are similar to Arrays in JavaScript. JavaScript JSON arrays looks like this −let obj = {    name:'Rohan',    sports : ['cricket', 'Football', 'volleyball', 'hockey'] }Following is the code for JSON arrays in JavaScript −Example Live Demo Document    body {     ... Read More

JavaScript Infinity Property

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:34:59

135 Views

The JavaScript infinity property displays infinity if the upper limit of the floating-point number is exceed and − infinity if the lower limit of the floating point number has has been exceeded.Following is the code for JavaScript infinity property −Example Live Demo Document    body { ... Read More

JavaScript Immediately Invoked Function Expressions (IIFE)

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:32:28

146 Views

The JavaScript Immediately Invoked Function Expressions (IIFE) is a JavaScript function that executes immediately after it has been defined so there is no need to manually invoke IIFE.Following is the code for Immediately Invoked Function Expressions (IIFE) in JavaScript −Example Live Demo Document    body { ... Read More

JavaScript global Property

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:27:45

253 Views

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

JavaScript getTime() Method

AmitDiwan

AmitDiwan

Updated on 11-May-2020 12:23:46

164 Views

The getTime() method in JavaScript returns the number of milliseconds elapsed since 1st January 1970.Following is the code for getTime() function −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .sample {       ... Read More

Advertisements