
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
529 Views
We are required to write a JavaScript function that takes in three or more numbers and returns the largest of those numbers.For example: If the input numbers are −4, 6, 7, 2, 3Then the output should be −7ExampleLet’s write the code for this function −// using spread operator to cater ... Read More

AmitDiwan
225 Views
We are required to write a JavaScript function that takes in an array of literals and sorts it using bubble sort. In Bubble Sort, each pair of adjacent elements is compared and the elements are swapped if they are not in order.ExampleLet’s write the code for this function −const arr ... Read More

AmitDiwan
6K+ Views
Compound Interest FormulaCompound interest is calculated using the following formula −CI = P*(1 + R/n) (nt) – PHere, P is the principal amount.R is the annual interest rate.t is the time the money is invested or borrowed for.n is the number of times that interest is compounded per unit t, ... Read More

AmitDiwan
349 Views
We are required to write a JavaScript function that takes in two numbers say m and n, and returns an array of size n with all the elements of the resulting array adding up to m.Let’s write the code for this function −ExampleFollowing is the code −const len = 8; ... Read More

AmitDiwan
218 Views
We are required to write a JavaScript function that takes in an array of literals and checks if elements are the same or not if read from front or back i.e. palindrome.ExampleLet’s write the code for this function −const arr = [1, 5, 7, 4, 15, 4, 7, 5, 1]; ... Read More

AmitDiwan
104 Views
Suppose, we have two arrays of literals like these :const arr1 = [2, 4, 5, 3, 7, 8, 9]; const arr2 = [1, 4, 5, 2, 3, 7, 6];We are required to write a JavaScript function that takes in two such arrays and returns a new array with all the ... Read More

AmitDiwan
317 Views
Suppose, we have an object of key value pairs like this −const obj = { name: "Vikas", age: 45, occupation: "Frontend Developer", address: "Tilak Nagar, New Delhi", experience: 23, salary: "98000" };We are required to write a function that takes in the object and ... Read More

AmitDiwan
384 Views
We are required to write a JavaScript function that takes in a number and returns the difference between the greatest and the smallest digit present in it.For example: If the number is 5464676, then the smallest digit here is 4 and the greatest is 7Hence, our output should be 3ExampleLet’s ... Read More

AmitDiwan
8K+ Views
Let’s say, we are required to write a JavaScript function that takes in a string like these to create a calculator −"4 add 6" "6 divide 7" "23 modulo 8"Basically, the idea is that the string will contain two numbers on either sides and a string representing the operation in ... Read More

AmitDiwan
914 Views
We are required to write a JavaScript function that takes in a string that contains some one-digit numbers in between and the function should return the sum of all the numbers present in the string.Let’s say the following is our string with numbers −const str = 'gdf5jhhj3hbj4hbj3jbb4bbjj3jb5bjjb5bj3';ExampleLet's write the code ... Read More