W3cubDocs

/Crystal 0.31

Overview

You can read this document from top to bottom, but it’s advisable to jump through sections because some concepts are interrelated and can’t be explained in isolation.

In code examples, the comment #=> is used to show the value of an expression. For example:

a = 1 + 2
a #=> 3

A comment using : is used for showing the type of a variable.

s = "hello"
# s : String

Let's start with two examples to familiarize ourselves with the language.

To the extent possible under law, the persons who contributed to this workhave waived
all copyright and related or neighboring rights to this workby associating CC0 with it.
https://crystal-lang.org/docs/overview/