Operations on All Elements

In this lesson, we will see operations on all elements of an array. This feature is for both fixed-length arrays and slices.

Operations on all elements of an array #

The [] characters written after the name of an array refers to all elements of the array. This feature simplifies the program when certain operations need to be applied to all of the elements of the array.

Get hands-on with 1200+ tech skills courses.