Optimize Your Work: How to Work With Operators


show more Operators in JavaScript allow you to move data, add data, subtract data, and more. Learn how to use arithmetic operators, assignment operators, the remainder operator, and the unary operator, and combine them with conditional statements to build some useful logic into your JavaScript code. show less
please wait ...

Working with operators

Just about every statement we will write is going to involve an operation, moving data from one place to another, adding, subtracting. Now to perform a lot of these operations we need operators, and that just means the symbols that we are using to manipulate our values. The most obvious are probably the arithmetic operators. We have addition, we have subtraction, an asterisk for multiplication, forward slash for division. Now you typically see these used along with the equal sign, and the equal sign is formally called the assignment operator.

When we hit the statement we are going to execute whatever's on the right of the equal sign and use it to assign of the value to whatever is on the left of the equal sign. So for those of you who are new to programming, remember that when you see a single equal sign that's not a polite description; that's a command. We are setting a value. We are assigning. Now you will often see the same variable being used on both sides of the equal si...

Working with operators
Video duration: 13m 28s 5h 31m Beginner

Viewers:

Operators in JavaScript allow you to move data, add data, subtract data, and more. Learn how to use arithmetic operators, assignment operators, the remainder operator, and the unary operator, and combine them with conditional statements to build some useful logic into your JavaScript code.

Subjects:
Developer Web
Software:
JavaScript
Author:
please wait ...