๐๐ฎ๐๐ฎ๐ฆ๐ฐ๐ฟ๐ถ๐ฝ๐ ๐ข๐ฝ๐ฒ๐ฟ๐ฎ๐๐ผ๐ฟ๐ ๐๐๐ถ๐ฑ๐ฒ
JavaScript operators are symbols. Use them to change, compare, and calculate values.
Arithmetic operators do math:
- adds numbers
- subtracts numbers
- multiplies numbers
- / divides numbers
- % finds the remainder
- ** calculates power
- ++ increases value by 1
- -- decreases value by 1
Assignment operators set values:
- = assigns a value
- += adds and assigns
- *= multiplies and assigns
Comparison operators check values. They give a true or false result:
- == checks equality
- === checks equality and data type
- != checks inequality
- !== checks inequality and data type
checks if left is larger
- < checks if right is larger
Logical operators combine conditions:
- && returns true if both are true
- || returns true if one is true
Relational operators check relationships:
- in checks if a property exists in an object
- instanceof checks the object type
Learn these symbols to control your code flow.
Source: https://dev.to/kamalesh_ar_6252544786997/understanding-javascript-operators-with-examples-42ne Optional learning community: https://t.me/GyaanSetuAi