Safer comparisons
Removing erroneous whitespaces (Only touched whitespace!)
Missing and unnecessary semicolons
new Array() to []
Variable naming issues
Safer comparisons
Mixed spaces and tabs, line break issues
Unescaped characters in regex, unnecessary commas