Rewrote boolean function to utilize proper logic. Added related variables and added further commentary to program execution. Also made adjustments recommended by JSHint
Added Array function and associated call. Also adjusted/added applicable variables.