JSHint errors and mistakes