Summary
This chapter has introduced several new concepts to get you started on writing real-world Crystal applications. You have learned about the basic types of values (numbers, text, ranges, and bools), how to define variables to store and manipulate data, and how to control the execution flow using conditionals and loops. You looked at creating methods to reuse code in a variety of ways. Finally, you learned about data collections with Array
and Hash
, together with using blocks and splat parameters. This is the toolbox you will use for the rest of this book.
The subsequent chapters begin applying this knowledge to practical projects. Next, let's embrace the object orientation features of Crystal to produce scalable software.