Fixed Javascript trailing comments
Merge pull request #1245 from davetobin/TrailingJsErrors

Fixed Javascript trailing commas