Initializing

This lesson discusses initializing variables using the new expression in Go

We'll cover the following

Using the new Expression

Now that we know the different types variables can take, we will look into initializing variables. Go supports the new expression to allocate a zeroed value of the requested type and to return a pointer to it.

Get hands-on with 1400+ tech skills courses.