

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: Constants
incomplete
2: Computed Constants
incomplete
3: Comparing Go's Speed
incomplete
4: Formatting Strings in Go
incomplete
5: Runes and String Encoding
incomplete
6: Fix Bugs
incomplete
7: Fix Types
incomplete
8: Type Inference
incomplete
9: Format Practice
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Constants are declared with the const keyword. They can't use the := short declaration syntax.
const pi = 3.14159
Constants can be primitive types like strings, integers, booleans and floats. They cannot be more complex types like slices, maps and structs, which are types we will explain later.
As the name implies, the value of a constant can't be changed after it has been declared.
Something weird is happening in this code.
What should be happening is that we create 2 separate constants: premiumPlanName and basicPlanName. Right now it looks like we're trying to overwrite one of them.
Complete the code to remove the bug and create the constant basicPlanName.