

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Learn Go
incomplete
2: Declaring a Variable
incomplete
3: Basic Variables
incomplete
4: Short Variable Declaration
incomplete
5: Why Go?
incomplete
6: Comments
incomplete
7: The Compilation Process
incomplete
8: Fast and Compiled
incomplete
9: Type Sizes
incomplete
10: Which Type Should I Use?
incomplete
11: Go Is Statically Typed
incomplete
12: Compiled vs. Interpreted
incomplete
13: Same Line Declarations
incomplete
14: Small Memory Footprint
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The var keyword is used to declare a variable the sad way. For example, to declare an integer variable called mySkillIssues and assign it the value 42:
// create a new variable, it defaults to 0
// (the "zero value" for ints)
var mySkillIssues int
// overwrite the zero value with 42
mySkillIssues = 42
Don't worry, we'll talk about a better way to declare variables in the next lesson.
The code should print the user's sending limit... but there's a syntax bug!
Fix the syntax error on line 6.