
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
AmitDiwan has Published 10744 Articles

AmitDiwan
2K+ Views
To remove text, use the concept of remove(). Use filter to get the content not inside element tag.Let’s say the following is our HTML −Demo Program This is also Demo ProgramAnd we have to remove “This is also Demo Program” since it is not under element tag. For that, the ... Read More

AmitDiwan
272 Views
Let’s say the following is our nested array −const arrayObject = [ [ { Name: "John" }, { countryName: "US" } ], [ { ... Read More

AmitDiwan
4K+ Views
To get the value of H1 to JavaScript variable, you can use −document.getElementById().innerHTML.Let’s say the following is our H1 heading − This is the demo program of JavaScript ........Now, let’s get the H1 value using the below code −Example Live Demo Document ... Read More

AmitDiwan
105 Views
Let’s say we have records with BOTID and Name of assigned users −let objectArray = [ { BOTID: "56", Name: "John" }, { BOTID: "57", Name: "David" }, { BOTID: "58", Name: "Sam"}, { BOTID: "59", Name: "Mike" }, { BOTID: "60", Name: "Bob" } ... Read More

AmitDiwan
346 Views
To add a newline in Unordered List, use the document.querySelector().append(). Following is the code −Example Live Demo Document h1{ font-size: 2.50rem; } h2, label{ font-size: 1.50rem; } Adding Name Demo ... Read More

AmitDiwan
280 Views
At first, set the keys −const name = ['Name1', 'Name2'];Now, map keys to the same value using for loop as in the below code −Exampleconst name = ['Name1', 'Name2']; const keyValueObject = {}; for (const k of name){ keyValueObject[k] = 'John'; } console.log(keyValueObject);To run the above program, you need ... Read More

AmitDiwan
739 Views
To remove and add new HTML tags, use the concept of hide() and show().Let’s say the following are our buttons −Click Me To hide above content Click Me To show above content To remove and add tags on button clicks, use hie() and show() −$(document).ready(function(){ $("#hide").click(function(){ ... Read More

AmitDiwan
1K+ Views
Let’s say the following are our values −let subjectNames = ['JavaScript', 'Angular', 'AngularJS', 'Java'];To count the non-empty and non-null values, use the forEach(). The syntax is as follows −yourArrayName.forEach(anyVariableName =>{ yourStatement1 . . . N } } )Now, use the if statement and check ... Read More

AmitDiwan
595 Views
Let’s say, we have the following objects in JavaScript −ObjectValue =[ { "id": "101", "details": { Name:"John", subjectName:"JavaScript" }}, { "id": "102", "details": { Name:"David", subjectName:"MongoDB" }}, { "id": "103" } ]To remove an object using filter(), the code is as follows −ExampleObjectValue =[ { "id": ... Read More

AmitDiwan
1K+ Views
For empty iframe src, use the element and set it like the following for an empty src −Example Live Demo Document To run the above program, save the file name “anyName.html(index.html)” and right click on the file. ... Read More