Abhishek has Published 65 Articles

How to change the ID of the element using JavaScript?

Abhishek

Abhishek

Updated on 17-Feb-2023 11:49:19

2K+ Views

Generally, the ID given to any element in an HTML document is unique and can be assign to an element only once. But it is possible to change that id later using the JavaScript following the same rule of uniqueness for new ID as well as only single element can ... Read More

How to debug JavaScript Program?

Abhishek

Abhishek

Updated on 17-Feb-2023 11:47:30

109 Views

While programming in any programming language, it is very general to do the mistakes in the logic building or in following the syntax rules of a language, which results in formation of errors and failure of our code to perform every task as expected. In this article, we are going ... Read More

How to change the value of a global variable inside of a function using JavaScript?

Abhishek

Abhishek

Updated on 17-Feb-2023 11:44:02

3K+ Views

There are two types of variables can be declared in any programming languages in context of their accessing scope. The Local variable and the Global variable. Global Scoped Variables − The global scoped variables are the variables which are declared globally inside the code file and can be accessed by ... Read More

What is a JavaScript call() Method?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:41:39

417 Views

JavaScript call() method is used to call a function with another object as the first argument. The call() method in JavaScript is a type of method that is used to write a function that can be used on different objects. The functionality of the call() method is almost similar to ... Read More

What is a JavaScript apply() Method?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:34:58

109 Views

The apply() method is used to create a method that can be used with different objects. We can use this method to call the functions of any object with some arguments. In this article, we will discuss about the apply() method in JavaScript Parameter − It accepts the values in ... Read More

What is a Global Object in JavaScript?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:20:23

1K+ Views

Objects in JavaScript are different from the Global Object. Using the new operator, you cannot create global objects. It comes into existence when the scripting engine is initialized. After it is initialized, the functions and constants are available for use. A global object allows you to do the following − ... Read More

What is Unary Negation Operator (-) in JavaScript?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:13:33

163 Views

The Unary Negation Operator first converts the operand into a number, and after that it negates. It operates on a single operand. It returns the negation of the operand. A boolean operand is converted to 0 or 1, and then negation is done. Similarly, a number with a base other ... Read More

What is Switch...case statement in JavaScript?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:11:34

351 Views

The objective of a switch statement is to give an expression to evaluate and several different statements to execute based on the value of the expression. The interpreter checks each case against the value of the expression until a match is found. If nothing matches, a default condition will be ... Read More

What is Subtraction Operator (-) in JavaScript?

Abhishek

Abhishek

Updated on 06-Jan-2023 12:07:26

1K+ Views

The subtraction operator is also known as the minus operator. It is a binary operator that means it requires at least two operands to operate on. It will not work with a single operand. Generally, the subtraction operator subtracts or minus the value of the second operand from the first ... Read More

What is Number.toExponential() method in JavaScript?

Abhishek

Abhishek

Updated on 06-Jan-2023 11:22:55

65 Views

In JavaScript, the Number.toExponential() method returns a string of a number representing the given number in its exponential form. This method is basically used to convert a number to its exponential form. Syntax The following syntax will show you how you can use the Number.toExponential() method to convert a number ... Read More

Advertisements