From the course: Introduction to Dart

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Arithmetic operators

Arithmetic operators - Dart Tutorial

From the course: Introduction to Dart

Arithmetic operators

- [Instructor] In the previous lesson, we looked at operators in their various types in Dart. Now let's look at some practical examples to better understand how to use them effectively. As a reminder, there are four basic arithmetic operators used in Dart, addition, subtraction, multiplication, and division. These operators perform the corresponding mathematical operations on two operands resulting in the new value. For example, if we have the expression two plus three, the plus sign operator, will add the operand two and three together resulting in the value five. Similarly, if we have the expression five minus two, the minus sign operator will subtract the operand two from the operand five, resulting in the value three. In addition to the basic arithmetic operators, there are also some more advanced arithmetic operators in Dart. These include the modular operator which returns the remainder of a division operation and…

Contents