Removed extra commas
Removed extra commas
Renamed 'var char' to 'var separatorChar'

'char' is a reserved word so shouldn't be used as a variable.
Merge pull request #784 from c-lamb/js_cleanup

Js cleanup