
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
3K+ Views
To store large numbers in JavaScript, use BigInt() rather than + operator. If you will use the + operator, then expect loss of precision.Let’s say the following is our large number and we are storing using BigInt() −console.log("Loss of precision with + operator..")ExampleFollowing is the code −var stringValue1="100"; console.log("The integer ... Read More

AmitDiwan
11K+ Views
To populate select list with jQuery, use for loop along with append() and append the options to the already created select.Let’s say we have the following select with options − John David ExampleFollowing is the code to append more number of options using append() − Live Demo ... Read More

AmitDiwan
567 Views
To convert integer array to string array, use the map(String) in JavaScript. Let’s say the following is our integer array −var integerValues = [101, 50, 70, 90, 110, 90, 94, 68];Convert integer array to string array −integerValues.map(String);ExampleFollowing is the code −var integerValues = [101, 50, 70, 90, 110, 90, 94, ... Read More

AmitDiwan
6K+ Views
Let’s say we have the following button −On click of the above button, call the function() with on() −$('#buttonId').on('click', function () { displayTheData(); })The above function is using the html() to display the following div − I am inside the div tag... ExampleFollowing is the complete code to ... Read More

AmitDiwan
476 Views
Let’s say the following is our first select − John David Bob Mike Sam Carol Following is our second select − David Mike Carol We need to remove the options in the first select, which are similar to options in the ... Read More

AmitDiwan
453 Views
Suppose we have an array that contains some dates like this −const arr = [ [ '02/13/2015', 0.096 ], [ '11/15/2013', 0.189 ], [ '05/15/2014', 0.11 ], [ '12/13/2013', 0.1285 ], [ '01/15/2013', 0.12 ], [ '01/15/2014', 0.11 ], [ '02/14/2014', 0.11 ], ... Read More

AmitDiwan
533 Views
We are required to write a JavaScript function that takes in an array of strings and returns an object corresponding to the strings.For example −If the array is −const arr = [ "country.UK.level.1", "country.UK.level.2", "country.US.level.1", "country.UK.level.3" ];Then the output should be −const output = { ... Read More

AmitDiwan
147 Views
We are required to write a JavaScript function that takes in an array of strings. The function should join all the strings of the array, replace all the whitespaces with dash "-", and return the string thus formed.For example: If the array is −const arr = ["QA testing promotion ", ... Read More

AmitDiwan
300 Views
Given an array X of multiple values (e.g. [-3, 5, 1, 3, 2, 10]), We are required to write a function that removes any negative values in the array.Once the function finishes its execution the array should be composed of just positive numbers. We are required to do this without ... Read More

AmitDiwan
168 Views
Given an array of integers, we are required to write a function that takes this array and finds the one element that appears an odd number of times. There will always be only one integer that appears an odd number of times.We will approach this problem by sorting the array. ... Read More