Go distinguishes between numbers and strings.
15is a number."15"is a string because it is surrounded by quotes.We can do math with numbers, but not with strings that only look like numbers.
Full lesson:
Types tell Go what kind of value we are working with.
var age int = 29
var phone string = "2025550153"
age is a number, so it has type int. phone is text, so it has type string, even though it contains digits.
Assignment
Follow the Coding Tutorial and make age a number and phone a string.
Hint
Numbers do not use quotes. Strings use quotes.
Free plan: 30 tutor messages. Premium is unlimited.
