Strings and Formatting
LockedLesson 3 of 25 · Syntax · Easy
Finish these first:Variables and Primitive Types →Or pass the tests below to unlock it now.
The big idea
A string holds text in Go — such as a word, name, or greeting. Wrap your text in double quotes "..." and store it with :=: Strings are case-sensitive ("Hello" and "hello" are different), and you can join two strings together with +.
Think of it like this: Think of a Go string like a line of text printed on a ticket — double quotes mark where the text begins and ends.
Read the lesson
A string holds text in Go — such as a word, name, or greeting.
Wrap your text in double quotes "..." and store it with :=:
city := "Tokyo"
name := "Maya"
note := "Welcome!"
Strings are case-sensitive ("Hello" and "hello" are different), and you can join two strings together with +.
Quick check
In Go, which quotes do you use around normal string text like "Tokyo"?
Your challenge
Inside main(), create a variable named greeting holding "Hello" (type greeting := "Hello").
More learning tools(compare languages, visual guide, related lessons)
Compare with another language
Similar to python.strings (86% overlap). UTF-8 string manipulation: template literals in JS, std::string in C++, immutable strings in Go, &str/String in Rust.
Visual walkthrough
A diagram, a step-by-step animation, and short captions for Strings and Formatting.
Learn this first
Opens up next
This is the last lesson in this branch.