
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
Found 10483 Articles for Web Development

7K+ Views
Hypertext and Hyperlink are related terms associated with navigation over computer network but they have a different meaning. One major difference between the hypertext and hyperlink is that the hypertext is a data which when clicked redirects us to some other location, while the hyperlink is a link to a computer resource embedded in the hypertext. Therefore, we can state that the hyperlink is an internal part of the hypertext. In this article, we discuss all the important differences between a hypertext and a hyperlink. Let's start with some basics of hypertexts and hyperlinks. What is a Hypertext? A ... Read More

484 Views
ProblemWe are required to write a JavaScript function that takes in a number. Our function should return the corresponding ASCII alphabet for that number (if there exists an alphabet for that ASCII value), -1 otherwise.The condition here is that we cannot use any inbuilt function that converts these values.ExampleFollowing is the code − Live Democonst num = 98; const findChar = (num = 1) => { const alpha = 'abcdefghijklmnopqrstuvwxyz'; if(num >= 97 && num = 65 && num

182 Views
ProblemWe are required to write a JavaScript function that takes in a callback function (which takes in two arguments and returns a value) as the first argument and two arrays of essentially the same length as the second and third argument.Our function should construct and return a new array whose each corresponding element is the return value of the callback function if corresponding numbers of the input array are provided to it.ExampleFollowing is the code − Live Democonst arr1 = [1, 2, 3, 4]; const arr2 = [5, 6, 7, 8]; const add = (a, b) => a + b; const ... Read More

244 Views
Upside Down NumbersThe numbers that remain the same when they’re rotated by 180 degrees are called upside down numbers.For instance, 9116, 69.ProblemWe are required to write a JavaScript function that takes in a range array of two numbers. Our function should return the count of all the upside down numbers that fall in the specified range.ExampleFollowing is the code − Live Democonst range = [5, 125]; const flipNum = (number) => { const upsideDownDigits = [0, 1, -99, -99, -99, -99, 9, -99, 8, 6]; let reverseNumArr = String(number) .split('') .map(val => Number(val)) ... Read More

237 Views
ProblemWe are required to write a JavaScript function that takes in a string as the first argument and a single character as the second argument.Our function should count and return the longest consecutive appearance of the the character in the string.ExampleFollowing is the code − Live Democonst str = 'abcdaaadse'; const char = 'a'; const countChars = (str = '', char = '') => { const arr = str.split(''); let c = 0, max = 0; for (let i = 0; i max){ max = c; }; }else{ if(c > max){ max = c; }; c = 0; }; }; return max; }; console.log(countChars(str, char));Output3

451 Views
ProblemWe are required to write a JavaScript function that takes in an array of integers. Our function should return the count of such contagious pairs from the array that have consecutive numbers in them.ExampleFollowing is the code − Live Democonst arr = [1, 2, 5, 8, -4, -3, 7, 6, 5]; const countPairs = (arr = []) => { let count = 0; for (var i=0; i

285 Views
ProblemWe are required to write a JavaScript function that takes in an array of literals of at least two elements.Our function should return all the ways to divide the array into two non-empty parts.For instance −For the array ["az", "toto", "picaro", "zone", "kiwi"]The possibilities are −"(az, toto picaro zone kiwi)(az toto, picaro zone kiwi)(az toto picaro, zone kiwi)(az toto picaro zone, kiwi)"ExampleFollowing is the code − Live Democonst arr = ["az", "toto", "picaro", "zone", "kiwi"]; const findAllPossiblities = (arr = []) => { let array; const res = []; for(let i = 1; i < arr.length; i++){ ... Read More

139 Views
ProblemWe are required to write a JavaScript function that takes in a number n as the only input. Suppose a sequence u for which,u1 = 0 and u1 = 2Our function should find the of un for which,6unun+1- 5unun+2+un+1un+2 = 0ExampleFollowing is the code − Live Democonst num = 13; const sequenceSum = (num = 1) => { const res = Math.pow(2, num); return res; }; console.log(sequenceSum(num));Output8192
862 Views
Unraveling the enigma of finding the solitary unique string within an array using JavaScript holds paramount importance for developers seeking to optimize their code. With the ability to handle complex data structures, JavaScript empowers programmers to solve intricate problems efficiently. In this article, we delve into the intricacies of identifying the lone unique string amidst an array, employing an arsenal of rarely used but indispensable techniques. By mastering the step-by-step approach presented herein, developers will acquire the prowess to sift through arrays, discerning the one string that stands distinct from the rest. Brace yourself for a journey into the depths ... Read More

635 Views
ProblemWe are required to write a JavaScript function that takes in a string which has integers inside it separated by spaces.The task of our function is to convert each integer in the string into an integer and return their sum.ExampleFollowing is the code − Live Democonst str = '1 5 12 76 2'; const sumStringNumbers = (str = '') => { const findSum = (arr = []) => { const sum = arr.reduce((acc, val) => acc + val); return sum; }; let sum = 0; const arr = str .split(' ') .map(Number); sum = findSum(arr); return sum; }; console.log(sumStringNumbers(str));Output96