Tsallaka zuwa abun ciki
Justice Tech School

Dart Operators

Arithmetic: + - * / ~/ %. / always gives a double and ~/ is integer division. Comparison: == != < > <= >=. Logical: && || !. ++ and -- add or subtract one.

Example
void main() {
  print(17 / 5);
  print(17 ~/ 5);
  print(17 % 5);
  print(3 > 2 && 2 > 1);
}

Exercise

Integer division.

17  5

Quiz Test

What does 17 / 5 give?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.