# JavaScript - Arithmetic Operators - W3Schools.com

## Метаданные

- **Канал:** w3schools.com
- **YouTube:** https://www.youtube.com/watch?v=yEJ94pMiT-o
- **Источник:** https://ekstraktznaniy.ru/video/38213

## Транскрипт

### Segment 1 (00:00 - 03:00) []

Hey there, JavaScript explorers! We're talking about Arithmetic Operators. The math wizards of JavaScript! First up, what are arithmetic operators? Simply put, they let us do math with numbers, whether those numbers are variables, literals, or expressions. Let’s break it down! Here are the Basic Operators: Addition Subtraction Multiplication Division Modulus Increment Decrement Exponentiation Let’s see them all in action! Addition and subtraction are the foundation of arithmetic. We use + to add numbers together and - to subtract one from another. Here, 5 + 2 gives us 7 And 5 - 2 results in 3. These operators are used everywhere, from simple calculations to complex algorithms! Multiplication scales numbers, while division splits them into equal parts. Multiplying 5 * 2 gives us 10, while dividing 5 / 2 results in 2. 5. These are crucial for handling calculations in any program! Modulo finds the remainder after division. This is useful for checking even or odd numbers. Since 5 / 2 leaves a remainder of 1. 5 % 2 gives us 1. This operator is widely used in gaming logic and loop conditions. Need to add or subtract one quickly? Use increment and decrement. x++, will increment, or increase x by 1. and x--, will decrement, or decrease it by 1. Great for counters and loops! Need to raise a number to a power? Use exponentiation 5 ** 2 calculates 5-squared, which is 25. This is perfect for mathematical operations like area calculations and physics formulas. Now, let’s talk about Operator Precedence Just like in math, JavaScript follows a specific order of operations. Multiplication and division happen before addition and subtraction. Here, 50 * 3 is done first, then added to 100, giving us 250. Parentheses override precedence. So ( 100 + 50 ) * 3 is calculated as 150 * 3, which gives 450! That’s it, folks! Arithmetic operators in JavaScript are super useful, and now you know how to use them like a pro. Try them out and keep coding! Thanks for watching! Like and subscribe to get notified about our latest videos! For more coding tips and tricks, keep it locked right here on W3Schools. com! Don't forget to try out what you've learned in our interactive editor. Happy coding!
