Some simple way on how to use javascript operators
JavaScript operators
JavaScript has various operators that allow you to perform operations on variables and values. Some common types include:
Arithmetic Operators:
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
% (modulo)
Assignment Operators:
= (assign)
+= (add and assign)
-= (subtract and assign)
*= (multiply and assign)
/= (divide and assign)
Comparison Operators:
== (equal to)
=== (strict equal to)
!= (not equal to)
!== (strict not equal to)
> (greater than)
< (less than)
>= (greater than or equal to)
<= (less than or equal to)
Logical Operators:
&& (logical AND)
|| (logical OR)
! (logical NOT)
Bitwise Operators:
& (AND)
| (OR)
^ (XOR)
~ (NOT)
<< (left shift)
>> (right shift)
>>> (unsigned right shift)
Unary Operators:
++ (increment)
-- (decrement)
- (negation)
+ (unary plus)
! (logical NOT)
These operators play a crucial role in manipulating data and controlling the flow of your JavaScript code.
Comments
Post a Comment