Primitive types

Variables

Some Primitive Data Types

Type  Example
String  “mega”
Integer  42
Float 3.14

Declaring variables

Implicit Type declaration

var varInt = 42

Declares a variable named “varInt”, assigns 42 and define type int.

Short form:

varInt := 42

Strings

name := "megaproaktiv"

Variable convention

Naming

Variable names begin with a letter or an underscore _. Allowed characters are the letters ‘a-z’,’A-Z’, digits 0-9 and _ .