Summary
In this chapter, we learned more about how variables work, and how they can be created using the VAR
keyword. With multiple types of data, variables must be created using static values. They can then be changed through an operation called assignment using lines starting with a tilde (~
) for writing a single line of code.
In the second topic, for the cases where we needed multiple values, we saw that the LIST
keyword can be used. This keyword allows us to create values other variables can use, but also comes with the limitations that only values created with LIST
can be used with a list. We also examined how all the values of a list are part of a Boolean set and have either true
or false
values upon creation.
Next, in the third topic, we investigated how functions work in ink. With several built-in functions, we can create random numbers or convert between types of numbers. With LIST
values, we compared the results of LIST_COUNT()
and LIST_ALL()
by examining how to change...