Process Array Elements

We can perform the following operations using the array elements to process them;

  • store data in an array element.
  • access array element to perform computation

When we store the array variable, it is on the left hand. The data or variable is on the right-hand side.

arr[0] = 3.15

The value 3.15 is stored in the first array element of the arr array.

We use the array variable with a subscript on the right-hand side to access an array element. We can process or store the array element in another variable.

name = “Mr ” & str[0] 

For example, if the string array’s first element is str[0] and contains “Java”

The name variable after the above assignment will contain: “Mr Java”