List of operators
Name | Description |
---|---|
These are the operators that operate upon the numerical values and return a numerical value. | |
assignment operator is equal (=) which assigns the value of the right-hand operand to its left-hand operand. That is if a = b assigns the value of b to a. | |
used to perform the logical operations that determine the equality or difference between the values | |
used to make decisions based on conditions specified for the statements. | |
JavaScript shorthand conditional operator for simple if-else statements. | |
performing bitwise operations on binary representations of numbers. | |
returns the data type of its operand in the form of a string. |
Example: Here are some basic examples of the above-mentioned operator.
// Addition
let a = 5 + 3;
console.log(a);
// Subtraction
let b = 10 - 4;
console.log(b);
// Addition Assignment
let y = 5;
y += 3;
console.log(y);
// Subtraction Assignment
let z = 15;
z -= 6;
console.log(z);
Output
8 6 8 9
We have a complete list of JavaScript Operators, to check those, please go through this JavaScript Operators Reference article.
JavaScript Basics
JavaScript is a versatile, lightweight scripting language widely used in web development. It can be utilized for both client-side and server-side development, making it essential for modern web applications. Known as the scripting language for web pages, JavaScript supports variables, data types, operators, conditional statements, loops, functions, arrays, and objects. With JavaScript, you can create dynamic, interactive, and engaging websites.
These are the basics that you need to learn before deep dive into JavaScript:
Table of Content
- Variables in JavaScript
- Data type in JavaScript
- Conditional statements in javascript
- Function in Javascript
- Looping in javascript
- Comments in javascript
- Operators in javascript