
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

12K+ Views
In this tutorial, we will learn how to perform the numeric Sort in JavaScript. We can arrange the given numerical values by numerical sorting into ascending or descending order In JavaScript, we use the sort () method to sort numerical values. This method sorts the arrays of numbers, strings, and objects. It sorts the elements of an array and changes the order of the original array's elements. The array elements are cast to strings to determine the order and then compared and sorted. arr.sort() Where arr is the array of numeric elements that need to be sorted, this method ... Read More

3K+ Views
In this tutorial, we will learn how to get the value of the rel attribute of a link in JavaScript. The rel attribute expressed the relationship between the current document or website and the linked document or website. The search engine uses this attribute to get more information about the link, so it is important for the SEO of the website. The rel attribute can have different values like alternate, author, external, nofollow, etc.; each value means different information about the link. For example, ‘alternate’ means the link represents an alternate version of the current document. Using document.getElementById() Method In ... Read More

2K+ Views
We can't say whether both are the same or both are different. In some cases, addition and concatenation will have the same result, but in some cases, they will be different. It is completely based on the type of variables. We will see it in detail below We use the + operator for addition and the concat() method for concatenation in JavaScript. In some cases, both the + operator and the concat() method returns the same result. Adding and concatenating two strings using the + operator and the concat() method returns the same result. We can also apply the ... Read More

869 Views
In this tutorial, we will learn if it is a good practice to end switch with defaults in JavaScript. In JavaScript, we generally use the if or if-else statements if we need to check any conditions. Still, if we need to check multiple conditions for an expression, it becomes very complex and unorganized, so we use the switch statements for that situation. The switch statement compares the value of an expression to a series of case clauses, then executes statements after the first case clause that matches the value, and so on, until a break statement is met. If no ... Read More

205 Views
In this tutorial, we will learn the best practices to follow while using JavaScript. JavaScript is used in almost every website to make it more user interactive. Throughout the years, ECMAScript has released different versions of JavaScript. Each version has enhanced functionalities and new features, so it is important to know the best practices to follow while using JavaScript. The following are the best practices to be followed while using JavaScript − Meaningful Variable and Function Name The variables’ and functions’ names should be meaningful to their uses. In JavaScript, we use the variable to store some data, and the ... Read More

9K+ Views
In this tutorial, we will learn how to get the value of the id attribute a link in JavaScript. The id attribute stores a unique value for an HTML element. The id of an element must be unique, and no other elements should not have the same id. The id attribute of a link can be found in different ways, and in this tutorial, we will discuss the most popular ways of doing it− Using document.getElementById() method Using document.getElementsByTagName() method Using document.querySelectorAll() method Using document.getElementById() Method In JavaScript, The document.getElementById() method is useful for getting different attributes value ... Read More

915 Views
In this tutorial, we will learn how to get the value of the hreflang attribute of a link in JavaScript. The hreflang is an attribute of a link or anchor tag which specifies the language of the linked document or href attribute. It is used by search engines to understand the link’s language and the targeted geographical location of the website. For better SEO hreflang attribute must be used. A single language or combination of language and region is used as the value of the hreflang attribute. It uses the language code ISO-639-1 and region code ISO-3166-1. For example: If ... Read More

13K+ Views
This tutorial teaches us how to remove the options from a dropdown list using JavaScript. Usually, this is not frequent that users get the option to remove any option from the dropdown list but this is possible if the option is provided by the programmer. If the programmer wants to provide the option to remove the dropdown then in JavaScript it is possible with the help of the remove() method. Using the DOM user can select the option to remove and by providing a function it could be passed to the remove method which will remove it. Let’s look into ... Read More

11K+ Views
We use the selectedIndex property in JavaScript to show the index of the selected option in a dropdown list. We use the id of the dropdown list to access the element using JavaScript and then call selectedIndex on it to get the index of the selected option in the dropdown list. Dropdown lists are an important part of user interface utility. It is a list of options from which one or multiple options can be selected by the user. These responses to these dropdown lists are then collected and the required course of action is taken by the user. A ... Read More

10K+ Views
This tutorial will show different ways to get the number of options in the drop-down list with JavaScript. While filling out any form online, users have to add unique information using the input method. However, the options they get in the drop-down list are already determined. Since there can be limited options mentioned in the drop-down, you might have to check the number using JavaScript. Using options.length method to get the number of drop-down options One of the simple ways to get access to the list of options is to get the list by its Id. We will use a ... Read More