Chapter 2. Getting to Work with Dart
In this chapter, you will get a firm grasp on how to program in Dart. The code and data structures in Dart and its functional principles are explained by exploring practical examples. We will look at the following topics:
- Variables: if, how, and when to type them
- What are the basic types that you can use?
- Documenting your programs
- How to influence the order of execution of a program
- Using functions in Dart
- How to recognize and catch errors and exceptions
You will see plenty of examples, we will also be revisiting the code from Chapter 1, Dart – A Modern Web Programming Language. Because most of this will be familiar to you, we will discuss these topics succinctly and emphasize only on the ones which are new or different. You can refer to http://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html if you need more detailed explanations. We encourage you to play with the code examples, it is the best way to become familiar with Dart. The full API reference documentation is available at http://api.dartlang.org. Experiment in the Dart Editor to find out more if in doubt!