
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 6710 Articles for Javascript

9K+ Views
Whenever you develop a website or application for a worldwide business, you must also focus on which language your audience can understand. For example, English is an international language, but in some parts of the world, people don’t understand English as they speak German, Spanish etc. However, if you have observed, then some websites provide the option to change the website's language. You just need to click on the button, which changes the whole website's language. Have you ever thought about how it is possible? Here, we will learn to switch the language of the web page using JavaScript. Syntax ... Read More

726 Views
Sometimes, developers may require to store the function in the queue and execute it in the order it is stored in the queue. In JavaScript, we can create a queue using the array. We can use the push() method of the array to enqueue the function in the queue and the shift() method to deque the function from the queue. Below, we will see examples of storing JavaScript functions in the queue and executing them in the queue order. Syntax Users can follow the syntax below to store JavaScript functions in a queue and execute in that order. while (queue.length ... Read More

2K+ Views
Storing data in the DOM means storing data in plain text format. For example, we store data in the state variable while using React or any other reactive framework. When the user updates the data in the input field, it stores updated data in the state variable. So, we store data in the state variable before we submit the form. At the time of submitting the form, we use the values of the state variables. In vanilla JavaScript, we can do the same, like storing data in plain text format, and whenever we require to submit the form, we can ... Read More

840 Views
In some text editors, when you select the text, it shows the menu to edit texts and provides functionalities like justifying text, aligning text, increasing the text size, changing colour, etc. Microsoft word is the best example of it. In Microsoft word, when you select any text, it shows the custom horizontal menu to perform some actions on the text. This tutorial will use JavaScript to create a custom menu on the text selection. Syntax Users can follow the syntax below to show some custom menu on text selection. let coOrdinates = document.querySelector(".content").getBoundingClientRect(); let posX = clientX - Math.round(coOrdinates.left) + ... Read More

255 Views
Overview to Java Optimization Java is a popular programming language for developing mobile apps to enterprise-level software systems. However, as the size and complexity of Java applications increase, so does the potential for performance issues. Java optimization identifies and addresses performance bottlenecks in Java applications to ensure they run efficiently and meet the desired performance requirements. In this article, we will explore the importance of Java optimization and provide an overview of key techniques and best practices for optimizing Java code. We will also discuss common performance issues, how to address them, and the tools and resources available to ... Read More

306 Views
To get maximum and minimum in a Square Matrix in JavaScript, we will be discussing two different approaches, their complexities, and example codes. First approach make use of nested loop while second approach uses Math function. In this article we are having a 2D square matrix, our task is to write a JavaScript program for maximum and minimum in a square matrix. Example Input: Matrix: [ [1, 3, 7], [5, 2, 9], [2, 5, 1] ] Output: Maximum = 9, Minimum = 1 ... Read More

267 Views
In this article, we will implement the JavaScript program for the Maximum sum of i*arr[i] among all the rotations of the given array. Here i*arr[i] expression indicates that we have to maximize the sum of all the elements of the array by taking the product of them with the current position. We can rotate the given array elements in the left of the right position to get the maximum answer. For this problem, we will see a complete code and a deep explanation. Introduction to Problem In this problem, we are given an array and if we multiply all the ... Read More

368 Views
A subarray is part of an array formed by removing some or no prefixes of the array and removing some or no suffix elements of the given array. We will try to find the subarray that will contain the elements, and by multiplying all of them, we can get the maximum value. We will implement the code with the explanation. In this article, we will implement a JavaScript program for the Maximum product subarray. Introduction to Problem In this problem, we are given an array and we have to pick any subarray from the given array, but the issue is ... Read More

231 Views
In this article, we are going to implement a JavaScript program for Maximizing elements using another array. We are given two arrays and have to pick some elements from the second array and replace the elements of the first array. We will see the complete code to implement the concepts that will be discussed. Introduction to Problem In this problem, we are given two arrays and we have to make all the elements of the first array maximum as possible or simply we have to make the sum of all elements of the first array maximum. We can pick elements ... Read More

187 Views
A matrix is a kind of 2-D array, which is in the form of some number of rows, and for each row, there is the same number of columns and by the row and column number, we can get the element at any particular index. For the Markov matrix, each row's sum must equal 1. We are going to implement a code to create a new Markov matrix and find if the currently given matrix is a Markov matrix or not. Introduction to Problem In the given problem, we have to write a code that will produce the Markov ... Read More