Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Assign the value of the customer type to the $-Variable $customerType.
  2. The first expression then increments the value of $total by 1 (i.e. counting the total number of types in the list).
  3. The second expression checks if the type is "Business" and if so calls continue() which causes forEach() to immediately skip to the next customer type in customers.type and starts again from the first expression (i.e. it does not reach the 3rd expression to increment the $-Variable $nonBusiness).
  4. If the type is not "Business" the third expression will be processed increment incrementing a count of the non-business types.
  5. The final expression is evaluated and the result added to the result Array of the forEach() function.

...