Bird

Variables

Variable Declaration

Bird has mutable and imutable variables. Types can be explicitly declared or inferred automatically. Values must be assigned during declaration.

Normal Variables

Use the var keyword to create a normal mutable variable.

Immutable Variables

Use the const keyword to create an imutable variable that cannot be modified later.

Variable Assignment

Bird permits reassignment of mutable variables.

Basic Assignment

An already declared variable can be overwritten using the = operator.

Assignment Operators

Bird supports additional assigment operators: +=, -=, *=, /=, %=.

Assignment Within Expressions

Assignments can be integrated into expressions to modify a variable and return its updatedvalue.

Still here?

Check out the playground!