Variables & Data Types (var, :=, const, Zero Values) - Go Tutorial for Beginners #2 -

6views
00
4:30
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
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

Duration

4:30

Published

January 25, 2026

Added to Codegiz

March 15, 2026

๐Ÿ“– Read the articleOpen in YouTube