
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
459 Views
We are required to write a JavaScript function that takes in a number and returns the count of numbers that exactly divides the input number.For example −If the number is 12, then its factors are −1, 2, 3, 4, 6, 12Therefore, the output should be 6.ExampleFollowing is the code −const ... Read More

AmitDiwan
1K+ Views
Suppose we have a data.txt file that lives in the same directory as our NodeJS file. Suppose the content of that file is −Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in string and returns an array with two string values, and they should be the smallest and largest words respectively from the string.For example −If the string is −const str = "Hardships often prepare ordinary people for an extraordinary destiny";Then ... Read More

AmitDiwan
881 Views
We are given the lengths of three sides of a triangle and we are required to write a function that returns the area of the triangle using the length of its sides.Heron's formulaWe can calculate the area of a triangle if we know the lengths of all three sides, using ... Read More

AmitDiwan
861 Views
We are required to write a JavaScript function that takes in a number and returns a number that can be represented as a power of 2 which is nearest to the input number.For example −If the input number if 365, then the output should be 256, because 256 is the ... Read More

AmitDiwan
514 Views
We are required to write a JavaScript function that takes in three numbers (representing the coefficient of quadratic term, coefficient of linear term and the constant respectively in a quadratic quadratic).And we are required to find the roots, (if they are real roots) otherwise we have to return false. Let's ... Read More

AmitDiwan
6K+ Views
We are required to write a JavaScript function that takes in a string and returns a new string with only the words that appeared for more than once in the original string.For example: If the input string is −const str = "big black bug bit a big black dog on ... Read More

AmitDiwan
688 Views
We are required to write a JavaScript function that takes in two 2-D arrays of numbers and returns their matrix multiplication result.Let’s say the following are our two matrices −// 5 x 4 let a = [ [1, 2, 3, 1], [4, 5, 6, 1], [7, 8, ... Read More

AmitDiwan
609 Views
We are required to write a JavaScript function that takes in a string and constructs a new string with all the uppercase characters converted to lowercase and all the lowercase characters converted to uppercase.Let’s write the code for this function −ExampleFollowing is the code −const str = 'The Case OF ... Read More

AmitDiwan
1K+ Views
We are required to write a JavaScript function that takes in a number and returns an array of all the prime numbers that exactly divide the input number.For example, if the input number is 18.Then the output should be −const output = [2, 3];ExampleLet’s write the code for this function ... Read More