June 2017
Beginner
1091 pages
22h 9m
English
Variables are spaces in computer's memory to store values that can be modified during the execution of the program. Variables and constants have a type like the ones described in preceding text. Although, you don't need to explicitly write the type of them (although you can do it). This property to avoid explicit type declaration is what is called Inferred types. For example:
//Explicitly declaring a "string" variable
var explicit string = "Hello, I'm a explicitly declared variable"
Here we are declaring a variable (with the keyword var) called explicit of string type. At the same time, we are defining the value to Hello World!.
//Implicitly declaring a "string". Type inferred inferred := ", I'm an inferred variable " ...
Read now
Unlock full access