
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

2K+ Views
To remove duplicate elements from an array in Javascript can be achieved using various approaches. We will be understanding six different approaches in this article, which can be used according to our requirement in various cases. In this article we are having a Javascript array and our task is to remove duplicate elements from array in JavaScript. Approaches to Remove Duplicate Elements From an Array Here is a list of approaches to remove duplicate elements from an array in JavaScript which we will be discussing in this article with stepwise explanation and complete example codes. ... Read More

564 Views
In this article, we are going to hide the password with ****. The password can be shown by toggling its visibility by using a button. We will be creating a JavaScript function that will display the hidden password when the toggle button is clicked.ApproachOn clicking the toggle button the JavaScript function to display the password will be rendered.This will change the CSS property applied on the HTML input tag that will display the password.We can toggle again to hide the password again.ExampleIn the below example, we are toggling the visibility of the password using the checkboxcheckbox. On clicking the checkbox ... Read More

6K+ Views
In this article, we will be exploring the event listeners and how to use them for pausing and playing a video. We will be using the mouse over and the mouseout events to control the video.The main element of this article includes playing the video whenever the mouse hovers over the video and stopping/pausing the video when the mouse is taken out of that div.For achieving this specific purpose, we will be using JavaScript that will record the events and play/pause the video.ApproachWe will attach a video to our HTML DOM element and then apply the mouse over and mouse ... Read More

8K+ Views
A server ping can be defined as hitting a server and getting a response in return from that server. The idea is to send an echo message that will keep the health check and check whether the server is up and running or not. On sending a PING every server sends a PONG that shows that the server is active. Ping messages are sent by the ICMP (Internet Control Messaging Protocol). The lower the ping time the stronger the connection between the host and the server.ApproachWe can use a JavaScript function for sending the Ping messages to the server. In ... Read More

1K+ Views
Mapping array values without using the map method can be done by using forEach() method, reduce() method, for loop, and while loop. In this article, we will implement some methods that will work efficiently for mapping array values. Table of Content Mapping array values without using map method can be done in the following ways: Using forEach() Using reduce() Using a for Loop Using while Loop Using forEach() The forEach() method allows you to iterate through each element in ... Read More

19K+ Views
To create animated counter, we will be using HTML, CSS and Javascript. An animated counter can be described as a display that counts an animation starting from 0 and ending at a specific number. In this article, the initial value of counter is set to 0, our task is to create animated counter using HTML, CSS, and JavaScript. Steps for Creating Animated Counter We will be follwoing below mentioned steps to create animated counter. We have used two div where one div will display the output i.e counter and other div acts as a container. ... Read More

1K+ Views
An Event is basically defined as an action or occurrence of an action that is recognized by the software. An Event can be triggered by any of the following: a user, a system, or a remote callback. Some of the popular events include pressing a button, hovering, clicking on hyperlinks, etc.In this article, we will be exploring some commonly used JavaScript events and learning how to handle these events and execute the required tasks. To handle events in HTML, we would need to add the function in the HTML tag that will be required to be executed in JavaScript when ... Read More

235 Views
In this article, we are going to explore property descriptors and how we can fetch these values from an object. The Object.getOwnPropertyDescriptor method returns an object that describes the specific property from the given object. A JavaScript object can be created in multiple ways that can be called by using the property descriptors from the object.SyntaxObject.getOwnPropertyDescriptor(obj, propThe property descriptor takes two parameters as inputs that are described below −obj − The object refers to the object name whose properties need to be described.prop − It defines the specific property from the object whose value needs to be returned.This method returns ... Read More

2K+ Views
In this article, we will be exploring strings and how they can be used as a literal and an object depending on the requirements. In JavaScript, strings can exist in two forms: String Literal: Created using quotes (', ", or `).String Object: Created explicitly using the String constructor, e.g., new String("text"). JavaScript Literals A JavaScript literal can be referred to as representing fixed values in source code. In most languages, values are denoted by Integers, floating-point numbers, strings, boolean, characters, arrays, records, and many more. JavaScript Objects On the other hand, a JavaScript object can be defined as a list of ... Read More

2K+ Views
In this article, we will explore how to find the minimum and maximum values from an array without using the Math functions. Math functions including Math.min() and Math.max() returns the minimum and maximum values out of all the numbers passed in the array.ApproachWe are going to use the same functionality of the Math functions that can be implemented using a loop.This will iterate over the array elements using the for loop and will update the minimum and maximum element in a variable after comparing it with each element from the array.On finding the value greater than the max value we ... Read More