
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
4K+ Views
Let’s say we have the following sample video tag on a web page You cannot play video here...... To hide a video on a web page, use yourVariableName.style.display=’none’.ExampleFollowing is the code − Document ... Read More

AmitDiwan
904 Views
Let’s say the following is our unsorted array with negative and positive numbers −var arr = [10, -22, 54, 3, 4, 45, 6];ExampleFollowing is the code to implement Bubble Sort −function bubbleSort(numberArray, size) { for (var lastIndex = size - 1; lastIndex > 0; lastIndex--) { ... Read More

AmitDiwan
351 Views
Let’s say the following is our array object −var arrayObject = [ "John", "David", "Mike" ]You can use length property to set the length to 0 and clear memoryThe syntax is as follows to clear memory −yourArrayObjectName.length=0; // To ... Read More

AmitDiwan
1K+ Views
You can use event listeners for clicks.ExampleFollowing is the code − Live Demo Document First Division Second Division document.addEventListener('click', callEventFuncion) ... Read More

AmitDiwan
302 Views
For this, use join(). It will concatenate the string value length-1.ExampleFollowing is the code −var count = 5; var values = new Array(count + 1).join('John'); console.log(values); var count1 = 5; var values1 = new Array(count1).join('John'); console.log(values1);To run the above program, you need to use the following command −node fileName.js. Here, ... Read More

AmitDiwan
1K+ Views
With Spread Operator, allow the expression to expand to multiple arguments, elements, variables, etc.You can use JSON.stringify() to convert the JavaScript object to string. Here, we have our object as the result of using spread operator on details1 and details2.ExampleFollowing is the code −var details1 = { name: 'John', age: ... Read More

AmitDiwan
205 Views
To validate a specific URL, use regular expression.ExampleThe code is as follows −function validateSoundURL(myURL) { var regularExpression = /^https?:\/\/(tutorialspoint\.com)\/(.*)$/; return myURL.match(regularExpression) && myURL.match(regularExpression)[2] } console.log(validateSoundURL("https://tutorialspoint.com/index")); console.log(validateSoundURL("https://tutorialspoint.com/java"));To run the above program, you need to use the following command −node fileName.js.Here, my file name is demo259.js.OutputThis will produce the following output on ... Read More

AmitDiwan
2K+ Views
Let’s say the following is our fixed element div − Fixed The CSS style to fix the above element −.fixedElement { position: fixed; background-color: skyblue; top: 0; left: 0; right: 0; }Following is our element, which will be scrolled − David Miller Now, ... Read More

AmitDiwan
667 Views
Let’s say the following is our file and we need to read this file using jQuery.The name of the file details −ExampleFollowing is the code − Live Demo Document function chooseFile() { ... Read More

AmitDiwan
984 Views
Let’s say the following is our select − Get First Name Get First Name Only To get only the first word, use split() on the basis of space and can select the 0th index value.ExampleFollowing is the code − Live Demo Document ... Read More