Constants are immutable by design, which means their values cannot be reassigned. Put in another way, they can be assigned once, at their declaration. When defining a constant you need to provide a name, type and a value:
⚠️ Notice the constant age can be squashed by another constant definition with the same name. Once the type of constant has been defined or induced the constant cannot handle other types.
As expected in the pure subset of a functional language, ReasonLIGO only features constant values: once they are declared, the value cannot be changed (or “mutated”).
⚠️ Notice the returned value of the function add is the temporary c constant.
1- In the top right editor, modify the code from the previous chapter to make my_ship a variable.
2- On the next line, modify its value to “222031”