Go for Beginners — Part 3

Literals

I’m starting to sense a trend here…

Constants

const bruhMoment = "bruh"

These must be initialized with a value at the time of declaration

Basic Data Types In Go

var bruh int
var bruh float
var bruh complex

Basic Numeric Data Types

To read more about Numeric Data Types click HERE

Variables

var variableName type

This is mainly used when you need to explicitly state the variable type or don’t have the data to assign the variable

variableName := value

Note that here you must assign the variable it’s value at the time of declaration

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store