Skip to main content

PrintArray

Recursively prints an array (including nested arrays) up to a specified depth.

Parameters:

  • array: The array to print.
  • depth: The maximum depth to recurse into nested arrays (default is 5).
  • indentLevel: The current indentation level (used for formatting).

Returns: A formatted string representation of the array.

Signature:

PrintArray(array, depth=5, indentLevel="")