I have a set of arrays in AutoHotkey which I want to display as strings for debugging.
strArray := ["Alice", "Mary", "Bob"] ; 1D array
strArray2D := [[1,2,3], [4,5,6]] ; 2D array
In Java, Javascript, and AutoIt I can accomplish this with the built-in toString() functions.
strArray.toString(); // JavaScript: "Alice,Mary,Bob"
Arrays.toString(strArray); // Java: "[Alice, Mary, Bob]"
_ArrayToString($strArray, ", ") ; AutoIt: "Alice, Mary, Bob"
AHK's developer lexikos has stated a built-in function for displaying arrays will not be added anytime soon, and most of the solutions I've found online seem fairly complex.
How can I print an array in AutoHotkey?