Appendix A. Core language reference

The core Dart language consists of variables and operators, a number of built-in types, flow-control statements, and function blocks. Dart is a dynamically typed language, similar to JavaScript, and type information in variable and parameter declarations is optional. The Dart virtual machine executes Dart code identically whether type information is provided or not. Any type information provided is used by tools to confirm the developer’s intention and provides documentation to future developers who may need to read and maintain the code.

A.1. Variable declaration

A variable is declared by prefixing the variable name with one of the following:

  • The var keyword (indicating a dynamic type, or no type information ...

Get Dart in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.