Variables & Data Types (var, :=, const, Zero Values) - Go Tutorial for Beginners #2 -
6views
004:30
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn how to work with variables and data types in Go! ๐
In this lesson, you will learn:
โ
Declaring variables with var keyword
โ
Short declaration with := operator
โ
Type inference in Go
โ
Constants with const
โ
Understanding zero values
โ
Basic types: string, int, float64, bool
๐ Timestamps:
0:00 - Introduction
0:24 - Variable Declaration with var
1:04 - Short Declaration with :=
1:44 - Constants
2:25 - Zero Values
3:05 - Recap
3:35 - End
๐ป Source Code: https://github.com/GoCelesteAI/go_variables
๐ Code from this lesson:
// Explicit declaration
var name string = "Alice"
var age int = 25
// Short declaration (type inference)
name := "Bob"
age := 30
// Constants
const Pi = 3.14159
const AppName = "MyApp"
// Zero values
var count int // 0
var message string // ""
var flag bool // false
๐ Previous: Lesson 1 - Introduction to Go
๐ Next: Lesson 3 - Strings & Formatting
#Go #Golang #GoTutorial #LearnGo #Programming #Variables #DataTypes #GoProgramming
Back to tutorials๐ Read the articleOpen in YouTube
Duration
4:30
Published
January 25, 2026
Added to Codegiz
March 15, 2026