alert(...) can be useful for debugging during development, but in production mode this kind of pop-up should never be displayed.

Noncompliant Code Example

if(unexpectedCondition)
{
  alert("Unexpected Condition");
}