Hi, In this chapter we will learn about data types in Go/Golang. I did gave some brief info about it in previous chapter of Variables. Now we will learn in detail.

There are 3 types of data type Integer, String and boolean.

Integer: Integer also known as Int is the data type which store numerical data such as 1,20,90, etc.

String: String stores alphabetical and special character such as "apple", "Billy","Train", "&",etc. To store character like and define that we the data we stored is a string we use quotation string "".

Boolean: Boolean represent true or false. Here 0 is false and non-zero is true.

Here are some examples of data types:


In last chapter we also learned about Float. Float is also one of data type it store numerical value with points or decimals. Such as 12.9, 45.7, 50.1, etc.