JXtension - Array.toString(showBrackets)

Purpose:
Gives the user the ability to print out the contents of an array.  Adds the ability to see the brackets at the beginning and end of the array and any sub-arrays.

Parameters:

[ showBrackets ] Specifies whether the brackets denoting the start and end of the array and any sub-arrays will be shown.  This parameter is optional and may be either true or false.

Returns:
A string displaying the contents of the array.  If showBrackets is set to true, the string will contain brackets denoting the start and end of of the array and any sub-arrays.

Example #1:
The code below will show you how to display the contents of the array in the traditional sense (without brackets):

 

Example #2:
The code below will show you how to display the contents of the array with brackets:

 

Example #3 (only works for version 1.1 or higher):
This example shows what will happen if an array is a descendant of itself: