Home > Web Front-end > JS Tutorial > body text

What are the operators in javascript

王林
Release: 2020-11-12 14:47:49
Original
10400 people have browsed it

The operators in JavaScript include: 1. Arithmetic operators; 2. Assignment operators; 3. String operators; 4. Comparison operators; 5. Conditional operators; 6. Logical operators; 7. Bit operators.

What are the operators in javascript

JavaScript arithmetic operators

(Video tutorial recommendation: javascript basic tutorial)

Arithmetic operators are used to perform operations on two variables or values.

Assignment y = 5, the following table will explain to you the use of arithmetic operators:

What are the operators in javascript

JavaScript assignment operator

Assignment operation symbol is used to assign values ​​to JavaScript variables.

Given x=10 and y=5, the following table explains the assignment operators:

What are the operators in javascript

JavaScript String Operators

operator, = operator can be used to concatenate strings.

Given text1 = "Good ", text2 = "Morning", and text3 = "", the following table explains the use of string operators:

What are the operators in javascript

Comparison operators

Comparison operators are used to judge logical statements to determine whether two given values ​​or variables are equal.

Given x=5, the following table shows the use of comparison operators:

What are the operators in javascript

Conditional operator

Conditional operator uses For conditional assignment operations.

Given x=6 and y=3, the following table demonstrates the operation of conditional operators:

What are the operators in javascript

Logical operators

Logical operators are used to determine logical relationships between variables or values.

Given x=6 and y=3, the following example demonstrates the use of logical operators:

What are the operators in javascript

JavaScript Bitwise Operators

Bit operators work on 32-bit numbers. Any numeric operations will be converted to 32 bits. The result is converted to a JavaScript number.

What are the operators in javascript

Related recommendations: js tutorial

The above is the detailed content of What are the operators in javascript. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!