0PricingLogin
Dart Academy · Lesson

Arithmetic and Operator Precedence

Add, subtract, multiply, divide, and group.

Math Is Built In

Dart speaks math out of the box. You write numbers and symbols, and the arithmetic operators compute the result for you. Let us add it up. ➕

Addition and Subtraction

The + operator adds and - subtracts. They work just like on paper, and the answer is a number you can store or print.

void main() {
  print(8 + 5); // 13
  print(8 - 5); // 3
}

All lessons in this course

  1. Arithmetic and Operator Precedence
  2. int vs double and Integer Division
  3. Parsing and Converting Numbers
  4. The dart:math Toolkit
← Back to Dart Academy