Get rid of the for loop building the alignment string for help information using something much more akin to array comprehension, we need to '+ 1' to get a useful result as joining an array of length 0 or 1 results in an empty result
More functional style using reduceRight, the comparison function always forwards the string with the greatest length to the next iteration
Simplified the code further, removing the need to check hasOwnProperty and using a more functional style