"I don't use bad words in test code."
This is actually really important. We had this happen with a customer whilst UAT testing. The project schedules were under pressure and as a result the customer went nuts (rightly so) and we had to make some concessions to customer as amends.It isn't just curse / bad words. Equally as bad are comments like:
"this was the customer's stupid idea not ours"
Also, if you really have to output test stuff in the browser use console.log('message') and not alert('message').Then for production you can always do this at the top of your main JavaScript include:
var console = {};
console.log = function(){};