Chapter 03 — Operators and Expressions
Part 1A — Learn Dart · Chapter 03 of 62 · 3 hrs
Chapter 03 — Operators and Expressions
Level: beginner Estimated time: 3 hrs Prerequisites: Chapter 02 — Variables, Constants, and Types What you will be able to do by the end: write calculations, comparisons, and complete Boolean expressions that are ready to be reused in conditions.
03.0 — Chapter objectives
By the end of this chapter, you will be able to:
- perform calculations with Dart;
- use arithmetic operators;
- understand integer division;
- calculate a remainder with
%; - quickly modify a variable with
+=,-=,*=,/=; - use
++and--; - compare values;
- create Boolean expressions;
- use the logical operators
&&,||, and!; - understand operator precedence;
- use the ternary operator;
- build expressions that will then be used with
if,else, andswitch.
03.1 — What is an operator?
An operator is a symbol that performs an operation.
Example:
int resultat = 10 + 5;
In this statement:
10 + 5
the symbol:
+
is an operator.
The values:
10
5
are the operands.
We can therefore represent:
Comments
Comments are powered by GitHub Discussions
Sign in with GitHub to join the discussion