...

/

Exercise: Basic Go Data Types

Exercise: Basic Go Data Types

Let’s test our understanding by attempting these challenges.

We'll cover the following...

Let’s practice what we’ve learned so far in the following exercises. Solutions to these exercises will be provided in the next lesson.

Problem 1

Create a function that concatenates two arrays into a new slice. Assume two input arrays of type int that consist of data—for example, {1,2} and {3,4,5,6}, respectively. Then, write a concatenate() function with suitable arguments that return a slice with contents {1,2,3,4,5,6}.

Access this course and 1400+ top-rated courses and projects.