So now we know how to write comments in Go, right? We use the //
symbol to make computers ignore certain parts of the code.
Engagement Message
Do you remember what's their main purpose?
So far, we've worked with different kinds of information, like text in quotes ("Hello"
) and whole numbers (42
).
Go treats these different kinds of information distinctly. They belong to different categories or types.
Engagement Message
Does this idea of categories make sense?
Text enclosed in quotation marks, like "Gopher"
or "Go Programming"
, is called a string. Think of it as a string of characters. In Go code, this type is called string
.
Engagement Message
Is "123"
a string or a number according to this definition?
Whole numbers, like 10
, 0
, or 999
, without any decimal points and without quotes around them, are called . In Go code, this type is called .
