
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 8591 Articles for Front End Technology

2K+ Views
Let’s say the following is our button −Press MeOn filling the below input field, the color of the above button should change −ExampleFollowing is the code − Live Demo Document UserName: Press Me function changeTheColorOfButtonDemo() { if (document.getElementById("changeColorDemo").value !== "") { document.getElementById("buttonDemo").style.background = "green"; } else { document.getElementById("buttonDemo").style.background = "skyblue"; } } To run ... Read More

778 Views
These days, password generators can be found all over the internet. Without a strong enough password, websites frequently won't let you establish an account. The task we are going to perform was how to create a password generator JavaScript. Let’s dive into the article for getting better understanding on creating a password generator. For this, use Math.random() to create random passwords. Using Math.random() method A floating-point pseudo-random number in the range [0, 1], 0 (inclusive), and 1(exclusive) is returned by the JavaScript function Math.random(). You can then resize this random number to fit the necessary range. Syntax Following is the ... Read More

688 Views
In JavaScript Arrays are used to store multiple values in a single variable. This is compared to a variable that can store only one value. Each item in an array has a number attached to it, called a numeric index, that allows you to access it. In JavaScript, arrays start at index zero and can be manipulated with various methods. This basically tells about true or false. If the item is found then it returns true, else false is returned. You can achieve the same in JavaScript arrays, using includes. Let’s dive into the article to understand more about the ... Read More

13K+ Views
In JavaScript, there are built-in methods for getting the current date and time in seconds. We are going to perform this in two ways − Using the Date.now() method Using a new date getTime() method Let’s dive into the article for getting better understanding on getting current date time in seconds. Using Date.now() method The Date.now() static method returns the milliseconds that ... Read More

132 Views
If the const is used in a program, and if you try to reassign the value to const variable then an error will arise.Let’s say the following is our const variable −const result = (first, second) => first * second;Now, we will try to reassign a value to the const variable and an erro can be seen in the output.ExampleFollowing is the code −const result = (first, second) => first * second; result = first => first =first*10; console.log(result(10, 20)); To run the above program, you need to use the following command −node fileName.js.Here, my file name is demo284.js.OutputThis will produce ... Read More

3K+ Views
The task at hand is to learn how to remove all blank objects from a JavaScript object. Let’s consider the following object − const details = { name: 'John', age: {}, marks: { marks: {} } } We need to remove the black objects above You can use forEach() along with typeof and delete to remove blank objects. Let’s dive into the article for getting better understanding on removing blank objects. Using reduce() A reducer function is run for each element of an array using the reduce() method. The function's ... Read More

1K+ Views
An array in JavaScript is a group of identically typed elements that are stored in adjacent memory locations and may each be separately referred to using an index to a special identifier. Let’s consider an array consisting of occurrences of repeated names. The array looks like this − var details = [ { studentName: "John", studentAge: 23 }, { studentName: "David", studentAge: 24 }, ... Read More

4K+ Views
Let’s say we have the following sample video tag on a web page You cannot play video here...... To hide a video on a web page, use yourVariableName.style.display=’none’.ExampleFollowing is the code − Document .hideVideo { display: block; z-index: 999; margin-top: 10px; margin-left: 10px; } You cannot play video here...... var hideVideo = document.getElementsByClassName("hideVideo")[0]; hideVideo.style.display = ... Read More

2K+ Views
The task we are going to perform in this article is make strings in array become keys in object in a new array in JavaScript. Let’s consider a simple array − let array= ['bike', 'car'] Now, we are going to use map() to convert the above array to a new array (keys in an object). The array will then look like this − let newArray= [{shorts: []}, {tees: []}, ] Let’s dive into the article to learn more about on making a strings in array become keys in object in a new array in JavaScript. Using map() The ... Read More

908 Views
Let’s say the following is our unsorted array with negative and positive numbers −var arr = [10, -22, 54, 3, 4, 45, 6];ExampleFollowing is the code to implement Bubble Sort −function bubbleSort(numberArray, size) { for (var lastIndex = size - 1; lastIndex > 0; lastIndex--) { for (var i = 0; i < lastIndex; i++) { if (numberArray[i] > numberArray[i + 1]) { var temp = numberArray[i]; numberArray[i] = numberArray[i + 1]; numberArray[i + ... Read More