- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 10711 Articles for Web Development
![Nitya Raut](https://www.tutorialspoint.com/assets/profiles/13573/profile/60_92249-1512715559.jpg)
195 Views
The void is an important keyword in JavaScript, which can be used as a unary operator that appears before its single operand, which may be of any type. This operator specifies an expression to be evaluated without returning a value.SyntaxThe syntax of void can be either of the following two − The most common use of this operator is in a client-side javascript: URL, where it allows you to evaluate an expression for its side-effects without the browser displaying the value of the evaluated expression.Here the expression alert ('Warning!!!') is evaluated but it ... Read More
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
248 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 than decimal is first converted to base 10, then the negation is computed. Syntax The following syntax will show you how you can use the unary negation operator to negate the value of a number − -x Here unary operator (-) negates x. Let us understand the application of ... Read More
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
347 Views
The less than operator is one of the operators that come under the category of binary operators, which means it requires two operands to operate on. It will return true if the operand on the left side of the operator is less than the operand on the right side. Otherwise, it will return false. The less than operator come under the category of comparison operators that compare two values with each other. In this tutorial, we are going to discuss what is less than an operator in JavaScript and how it works in different situations, with help of code examples. ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
252 Views
The if...else if... statement is an advanced form of if…else that allows JavaScript to make a correct decision out of several conditions.SyntaxThe syntax of an if-else-if statement is as follows −if (expression 1){ Statement(s) to be executed if expression 1 is true } else if (expression2){ Statement(s) to be executed if expression 2 is true } else if (expression3){ Statement(s) to be executed if expression 3 is true } else{ Statement(s) to be executed if no expression is true }ExampleYou can try to run the following to learn how to work with if…else if statement in ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
177 Views
The if statement is the fundamental control statement that allows JavaScript to make decisions and execute statements conditionally. SyntaxThe syntax for a basic if statement is as follows −if(expression){ Statement(s)to be executed if expression is true }Here a JavaScript expression is evaluated. If the resulting value is true, the given statement(s) are executed. If the expression is false, then no statement would be not executed. Most of the times, you will use comparison operators while making decisions.ExampleYou can try to run the following to learn how to work with if statement in JavaScript −Live Demo ... Read More
![Smita Kapse](https://www.tutorialspoint.com/assets/profiles/13597/profile/60_103706-1512718957.jpg)
137 Views
The new keyword in JavaScript is the new operator. It creates an instance of a user-defined object type.SyntaxHere’s the syntax −new constructor[([arguments])]ExampleLet us see an example to learn about the usage of new operator − var dept = newObject(); dept.employee = "David"; dept.department = "Programming"; dept.technology = "C++"; document.getElementById("test").innerHTML = dept.employee + "is working on " + dept.technology + " technology.";
![Abhinaya](https://www.tutorialspoint.com/assets/profiles/13548/profile/60_54851-1512705920.jpg)
206 Views
It performs XOR operation on the right operand with the left operand and assigns the result to the left operand.ExampleYou can try to run the following code to learn how to work with Bitwise XOR Assignment OperatorLive Demo var a = 2; // Bit presentation 10 var b = 3; // Bit presentation 11 document.write("(a ^= b) => "); document.write(a ^= b);
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
173 Views
It performs OR operation on the right operand with the left operand and assigns the result to the left operand.ExampleYou can try to run the following code to learn how to work with Bitwise OR Assignment Operator − var a = 2; // Bit presentation 10 var b = 3; // Bit presentation 11 document.write("(a |= b) => "); document.write(a |= b);
![Nitya Raut](https://www.tutorialspoint.com/assets/profiles/13573/profile/60_92249-1512715559.jpg)
2K+ Views
The “double tilde” (~~) operator is a double NOT Bitwise operator. Use it as a substitute for Math.floor(), since it’s faster.ExampleYou can try to run the following code to learn about double tilde operator − var a = 2; var b,c, d; b = ~~a; c = Math.floor(a); d = ~~b=== c; document.write(b); document.write(""+c); document.write(""+d); // They are equal