Fixed a couple of errors with JsLint and JsHint

Hello,
this pull request fixes a couple of errors with JsLint and JsHint on when.js file:

Fixed JsHint error: !== instead of != on row 831
Fixed JsLint error: added space after function definition on row 14