
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Web Development Articles - Page 565 of 1049

216 Views
To set the color of the text decoration, use the text-decoration-color property. To place this color overline, underline, line through, etc, use the text-decoration property. Let us see how to set the color of the text decoration Color the text decoration overline The text is decorated overline and then the color is set using the text-decoration-color property − .demo { text-decoration: overline; text-decoration-color: yellow; } Example Here is the example − .demo { ... Read More

111 Views
The symbol.description property in JavaScript converts a Symbol object to a primitive value. The syntax is as follows −Symbol()[Symbol.toPrimitive](hint);Example Live Demo Demo Heading Click to display... Result function display() { const val = Symbol('john'); console.log(val[Symbol.toPrimitive]); } OutputClick the “Result” button −Example Live Demo Demo Heading Click to display... Result function display() { const val = Symbol(2465); var res = val[Symbol.toPrimitive](99); console.log(res) } OutputClick the “Result” button and get the result in Console −

185 Views
The array.values() method of JavaScript returns a new Array Iterator object that contains the values for each index in the array.The syntax is as follows −arr.values()Let us now implement the array.values() method in JavaScript −Example Live Demo Demo Heading Click the button to display the value... Result function display() { var arr = ['p', 'q', 'r']; var res = arr.values(); document.getElementById("test").innerHTML = res.next().value } OutputClick on the “Result” button −Example Live Demo Ranking Points Click to display the points... Result ... Read More

265 Views
The toLocaleString() method of JavaScript is used to convert a Date object to a string using locale settings.The syntax is as follows −Date.toLocaleString(locales, options)Above, the locales parameter is the language specific format to be used −ar-SA Arabic (Saudi Arabia) bn-BD Bangla (Bangladesh) bn-IN Bangla (India) cs-CZ Czech (Czech Republic) da-DK Danish (Denmark) de-AT Austrian German de-CH "Swiss" German de-DE Standard German (as spoken in Germany) el-GR Modern Greek en-AU Australian English en-CA Canadian English en-GB British English en-IE Irish English en-IN Indian English en-NZ New Zealand English en-US US English en-ZA English (South Africa) es-AR Argentine Spanish es-CL Chilean Spanish ... Read More

222 Views
The splice() method of JavaScript is used to add or remove item. It returns the removed item.The syntax is as follows −array.splice(index, num, item1, ....., itemX)Here, index is the integer specifying at what position to add or remove items, num is the number of items to remove, item1…itemX are the items to be added to the array.Let us now implement the splice() method in JavaScript −Example Live Demo Products Click to display the updated product list... Result var products = ["Electronics", "Books", "Accessories"]; document.getElementById("test").innerHTML = products; function display() { products.splice(1, 2, ... Read More

140 Views
The Array.prototype.map() function of JavaScript is used create a new array with the results of called function.The syntax is as follows −arr.map(function callback(currentValue[, index[, array]])Let us now implement the Array.prototype.map() method in JavaScript −Example Live Demo Demo Heading Click to display the abs() result... Result function display() { var arr = [1, -2, 3, 4, 5, -6, 7, 8, 9, 10]; var res = arr.map(Math.abs); document.write(res); } OutputClick the “Result” button above −Example Live Demo Demo Heading Click to round the numbers... Result ... Read More

124 Views
The Array.of() method of JavaScript is used to create a new array instance with variables as parameter values.The syntax is as follows −Array.of(elements....)Above, elements are the values as parameter values.Let us now implement the Array.of() method in JavaScript −Example Live Demo Demo Heading Click the button to display the values in Console Result function display() { console.log(Array.of(10, 20, 30, 40 ,50)); } OutputClick the “Result” and check the Console for the output −Example Live Demo ... Read More

267 Views
The array.keys() method of JavaScript is used to return an Array Iterator object with the keys of an array.The syntax is as follows − array.keys()Let us now implement the array.keys() method in JavaScript −Example Live Demo Car Variants var arrStud = ["Crossover", "Convertible", "Hatchback", "SUV"]; var res = arrStud.keys(); for (val of res) { document.getElementById("test").innerHTML += val + ""; } OutputExample Live Demo Ranking Points Click the button to display ... Read More

245 Views
The Array.isArray() method of JavaScript is used to determine whether an object is an array or not.The syntax is as follows −Array.isArray(ob)Above, the ob parameter is the object to be tested.Let us now implement the Array.isArray() method in JavaScript −Example Live Demo Ranking Points Is this an array? Click the below button to get the answer... Result var pointsArr = [10, 20, 30, 40, 50, 60, 70, 80, 90, 1000]; var res = pointsArr.entries(); for (val of res) { ... Read More

171 Views
The array.includes() method of JavaScript is used to check whether an array contains a specified element.The syntax is as follows −array.includes(ele, start)Above, the parameter ele is the element to search for. The start parameter is the position to begin the search with.Let us now implement the array.includes() method in JavaScript −Example Live Demo Car Variant Result var carid = ["110", "230", "299", "399"]; document.getElementById("test").innerHTML = carid; function display() { var n = carid.includes("230"); document.getElementById("test").innerHTML = ... Read More