Versions Compared

Key

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

...

Returns 55. The forEach will return the value at each iteration ([1, 3, 6, 10, 15, 21, 28, 36, 45, 55]), the do then returns the final value of $sumOfNumbers.

Detailed example: (step-by-step)

Code Block
forEach( $customerType, customers.type, 

   $total = $total + 1, 

   if( $customerType == "Business", continue() ), 

   $nonBusiness = $nonBusiness + 1, 

   subString($customerType, 1, 6) 
)

...